From 34065e1b59cbb6fb96f146139c4dfa12c71d9238 Mon Sep 17 00:00:00 2001 From: Lai Power Date: Sun, 25 Jul 2021 23:25:29 +0000 Subject: [PATCH] updated theme `GeneratePress` version 3.0.4 --- wp-content/themes/generatepress/404.php | 92 +- wp-content/themes/generatepress/archive.php | 156 +- .../assets/css/admin/block-editor.css | 330 +- .../generatepress/assets/css/admin/style.css | 464 +- .../themes/generatepress/assets/css/all.css | 5123 ++++++++--------- .../generatepress/assets/css/all.min.css | 2 +- .../assets/css/components/comments.css | 250 +- .../assets/css/components/font-icons.css | 324 +- .../themes/generatepress/assets/css/main.css | 3277 ++++++----- .../generatepress/assets/css/main.min.css | 2 +- .../generatepress/assets/css/mobile.css | 516 +- .../themes/generatepress/assets/css/style.css | 3697 ++++++------ .../generatepress/assets/css/style.min.css | 2 +- .../themes/generatepress/assets/js/a11y.js | 254 +- .../generatepress/assets/js/back-to-top.js | 130 +- .../generatepress/assets/js/dropdown-click.js | 248 +- .../themes/generatepress/assets/js/main.js | 860 +-- .../themes/generatepress/assets/js/menu.js | 604 +- .../assets/js/navigation-search.js | 256 +- .../themes/generatepress/content-404.php | 134 +- .../themes/generatepress/content-link.php | 222 +- .../themes/generatepress/content-page.php | 186 +- .../themes/generatepress/content-single.php | 204 +- wp-content/themes/generatepress/content.php | 222 +- wp-content/themes/generatepress/footer.php | 130 +- wp-content/themes/generatepress/functions.php | 206 +- wp-content/themes/generatepress/header.php | 150 +- .../themes/generatepress/inc/block-editor.php | 848 +-- .../generatepress/inc/class-theme-update.php | 654 +-- .../themes/generatepress/inc/css-output.php | 2442 ++++---- .../themes/generatepress/inc/customizer.php | 3120 +++++----- .../controls/js/customizer-controls.js | 1002 ++-- .../controls/js/customizer-live-preview.js | 1328 ++--- .../inc/customizer/customizer-helpers.php | 46 +- .../generatepress/inc/customizer/helpers.php | 696 +-- .../themes/generatepress/inc/dashboard.php | 756 +-- .../themes/generatepress/inc/defaults.php | 736 +-- .../themes/generatepress/inc/general.php | 872 +-- .../generatepress/inc/plugin-compat.php | 1654 +++--- .../generatepress/inc/structure/archives.php | 234 +- .../generatepress/inc/structure/comments.php | 408 +- .../generatepress/inc/structure/footer.php | 490 +- .../generatepress/inc/structure/header.php | 808 +-- .../inc/structure/navigation.php | 1270 ++-- .../generatepress/inc/structure/post-meta.php | 1158 ++-- .../generatepress/inc/theme-functions.php | 1388 ++--- .../themes/generatepress/inc/typography.php | 2242 ++++---- wp-content/themes/generatepress/index.php | 150 +- .../themes/generatepress/no-results.php | 156 +- wp-content/themes/generatepress/page.php | 118 +- wp-content/themes/generatepress/readme.txt | 10 +- wp-content/themes/generatepress/search.php | 166 +- .../themes/generatepress/sidebar-left.php | 68 +- wp-content/themes/generatepress/sidebar.php | 68 +- wp-content/themes/generatepress/single.php | 108 +- wp-content/themes/generatepress/style.css | 44 +- 56 files changed, 20547 insertions(+), 20534 deletions(-) diff --git a/wp-content/themes/generatepress/404.php b/wp-content/themes/generatepress/404.php index 24810c5f..8f35f1ad 100644 --- a/wp-content/themes/generatepress/404.php +++ b/wp-content/themes/generatepress/404.php @@ -1,46 +1,46 @@ - - -
> -
> - -
-
- - + +
> +
> + +
+
+ + - -
> -
> - -
-
- - + +
> +
> + +
+
+ + h3.hndle { - padding-top: 12px; - padding-bottom: 12px; -} - -@media (min-width: 768px) { - .hide-on-desktop { - display: none; - } - - .grid-70 { - float: left; - width: 70%; - box-sizing: border-box; - padding-right: 20px; - } - - .grid-30 { - float: left; - width: 30%; - box-sizing: border-box; - padding-left: 20px; - } - - .grid-parent { - padding-left: 0; - padding-right: 0; - } -} - -@media (max-width: 767px) { - .hide-on-mobile { - display: none; - } - .gp-masthead .gp-masthead-links, - .gp-masthead .gp-title { - float: none; - text-align: center; - } - .gp-masthead .gp-title { - margin-bottom: 20px; - } -} +.js .generate-metabox.postbox .hndle { + cursor: inherit; +} + +.generate-metabox .clear { + padding-top: 10px; + margin-bottom: 10px; + border-bottom: 1px solid #DDD; +} + +.generate-metabox .clear:after { + content: ""; + display: table; + clear: both; +} + +.customize-button a.button, +.customize-button a.button:visited { + font-size: 25px; + padding: 10px 20px; + line-height: normal; + height: auto; + width: 100%; + text-align: center; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; +} + +.customize-button { + margin-bottom: 40px; +} + +.addon-container:before, +.addon-container:after { + content: "."; + display: block; + overflow: hidden; + visibility: hidden; + font-size: 0; + line-height: 0; + width: 0; + height: 0; +} +.addon-container:after { + clear: both; +} +.premium-addons .gp-clear { + margin: 0 !important; + border: 0; + padding: 0 !important; +} +.premium-addons .add-on.gp-clear { + padding: 15px !important; + margin: 0 !important; + -moz-box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.1) inset; + -webkit-box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.1) inset; + box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.1) inset; +} +.premium-addons .add-on:last-child { + border: 0 !important; +} +.addon-action { + float: right; + clear: right; +} +.addon-name { + float: left; +} + +.addon-name a { + text-decoration: none; + font-weight: bold; +} + +/* New admin */ +.clearfix:after, +.clearfix:before { + content: "."; + display: block; + overflow: hidden; + visibility: hidden; + font-size: 0; + line-height: 0; + width: 0; + height: 0; +} + +.clearfix:after { + clear: both; +} + +.gp-container { + max-width: 1200px; + margin: 0 auto; + padding: 0 20px; + box-sizing: border-box; +} + +.gp-container a { + text-decoration: none; +} + +.appearance_page_generate-options #wpcontent, +.appearance_page_generate-options #wpbody-content .metabox-holder { + padding: 0; +} + +.appearance_page_generate-options .wrap { + margin-top: 0; + margin-left: 0; + margin-right: 0; +} + +.gp-masthead { + background-color: #fff; + text-align: center; + box-shadow: 0 1px 0 rgba(200,215,225,0.5), 0 1px 2px #DDD; + margin-bottom: 40px; + padding: 20px; +} + +.gp-container .postbox { + box-shadow: 0 0 0 1px rgba(200, 215, 225, 0.5), 0 1px 2px #DDD; + border: 0; + min-width: initial; + margin-bottom: 40px; +} + +.gp-masthead .gp-title { + float: left; +} + +.gp-masthead .gp-title a { + font-size: 20px; + color: #000; + font-weight: 500; +} + +.gp-masthead .gp-masthead-links { + float: right; +} + +.gp-masthead-links a { + display: inline-block; + margin: 0 10px; +} + +.gp-masthead .gp-version { + display: inline-block; + background: #EFEFEF; + padding: 1px 3px; + border-radius: 2px; + font-size: 11px; + vertical-align: top; + margin-left: 5px; +} + +.gp-options-footer { + text-align: center; +} + +.popular-articles ul { + list-style-type: disc; + margin-left: 20px; + margin-bottom: 0; +} + +.popular-articles .hndle a { + float:right; + font-size:13px; +} + +#gen-delete p:last-child { + margin-bottom: 0; +} + +.start-customizing li { + margin-bottom: 15px; +} + +.start-customizing li span { + padding-right: 5px; +} + +.start-customizing ul { + border-bottom: 1px solid #ddd; +} + +.gp-container .postbox > h3.hndle { + padding-top: 12px; + padding-bottom: 12px; +} + +@media (min-width: 768px) { + .hide-on-desktop { + display: none; + } + + .grid-70 { + float: left; + width: 70%; + box-sizing: border-box; + padding-right: 20px; + } + + .grid-30 { + float: left; + width: 30%; + box-sizing: border-box; + padding-left: 20px; + } + + .grid-parent { + padding-left: 0; + padding-right: 0; + } +} + +@media (max-width: 767px) { + .hide-on-mobile { + display: none; + } + .gp-masthead .gp-masthead-links, + .gp-masthead .gp-title { + float: none; + text-align: center; + } + .gp-masthead .gp-title { + margin-bottom: 20px; + } +} diff --git a/wp-content/themes/generatepress/assets/css/all.css b/wp-content/themes/generatepress/assets/css/all.css index 39c063cf..b7226a11 100644 --- a/wp-content/themes/generatepress/assets/css/all.css +++ b/wp-content/themes/generatepress/assets/css/all.css @@ -1,2562 +1,2561 @@ -.grid-container:before, .grid-15:before, .grid-20:before, .grid-25:before, .grid-30:before, .grid-35:before, .grid-40:before, .grid-45:before, .grid-50:before, .grid-55:before, .grid-60:before, .grid-65:before, .grid-70:before, .grid-75:before, .grid-80:before, .grid-85:before, .grid-100:before, .grid-33:before, .grid-66:before, [class*="mobile-grid-"]:before, [class*="tablet-grid-"]:before, .clearfix:before, -.grid-container:after, -.grid-15:after, -.grid-20:after, -.grid-25:after, -.grid-30:after, -.grid-35:after, -.grid-40:after, -.grid-45:after, -.grid-50:after, -.grid-55:after, -.grid-60:after, -.grid-65:after, -.grid-70:after, -.grid-75:after, -.grid-80:after, -.grid-85:after, -.grid-100:after, -.grid-33:after, -.grid-66:after, -[class*="mobile-grid-"]:after, -[class*="tablet-grid-"]:after, -.clearfix:after { - content: "."; - display: block; - overflow: hidden; - visibility: hidden; - font-size: 0; - line-height: 0; - width: 0; - height: 0; -} - -.grid-container:after, .grid-15:after, .grid-20:after, .grid-25:after, .grid-30:after, .grid-35:after, .grid-40:after, .grid-45:after, .grid-50:after, .grid-55:after, .grid-60:after, .grid-65:after, .grid-70:after, .grid-75:after, .grid-80:after, .grid-85:after, .grid-90:after, .grid-95:after, .grid-100:after, .grid-33:after, .grid-66:after, [class*="mobile-grid-"]:after, [class*="tablet-grid-"]:after, .clearfix:after { - clear: both; -} - -.grid-container { - margin-left: auto; - margin-right: auto; - max-width: 1200px; - padding-left: 10px; - padding-right: 10px; -} - -.grid-15, .grid-20, .grid-25, .grid-30, .grid-35, .grid-40, .grid-45, .grid-50, .grid-55, .grid-60, .grid-65, .grid-70, .grid-75, .grid-80, .grid-85, .grid-90, .grid-95, .grid-100, .grid-33, .grid-66, [class*="mobile-grid-"], [class*="tablet-grid-"] { - box-sizing: border-box; - padding-left: 10px; - padding-right: 10px; -} - -.grid-parent { - padding-left: 0; - padding-right: 0; -} - -@media (max-width: 767px) { - .hide-on-mobile { - display: none !important; - } - .mobile-grid-50 { - float: left; - width: 50%; - } - .mobile-grid-100 { - clear: both; - width: 100%; - } -} - -@media (min-width: 768px) and (max-width: 1024px) { - [class*="tablet-push-"], - [class*="tablet-pull-"] { - position: relative; - } - .hide-on-tablet { - display: none !important; - } - .tablet-grid-15 { - float: left; - width: 15%; - } - .tablet-push-15 { - left: 15%; - } - .tablet-pull-15 { - left: -15%; - } - .tablet-grid-20 { - float: left; - width: 20%; - } - .tablet-push-20 { - left: 20%; - } - .tablet-pull-20 { - left: -20%; - } - .tablet-grid-25 { - float: left; - width: 25%; - } - .tablet-push-25 { - left: 25%; - } - .tablet-pull-25 { - left: -25%; - } - .tablet-grid-30 { - float: left; - width: 30%; - } - .tablet-push-30 { - left: 30%; - } - .tablet-pull-30 { - left: -30%; - } - .tablet-grid-35 { - float: left; - width: 35%; - } - .tablet-push-35 { - left: 35%; - } - .tablet-pull-35 { - left: -35%; - } - .tablet-grid-40 { - float: left; - width: 40%; - } - .tablet-push-40 { - left: 40%; - } - .tablet-pull-40 { - left: -40%; - } - .tablet-grid-45 { - float: left; - width: 45%; - } - .tablet-push-45 { - left: 45%; - } - .tablet-pull-45 { - left: -45%; - } - .tablet-grid-50 { - float: left; - width: 50%; - } - .tablet-push-50 { - left: 50%; - } - .tablet-pull-50 { - left: -50%; - } - .tablet-grid-55 { - float: left; - width: 55%; - } - .tablet-push-55 { - left: 55%; - } - .tablet-pull-55 { - left: -55%; - } - .tablet-grid-60 { - float: left; - width: 60%; - } - .tablet-push-60 { - left: 60%; - } - .tablet-pull-60 { - left: -60%; - } - .tablet-grid-65 { - float: left; - width: 65%; - } - .tablet-push-65 { - left: 65%; - } - .tablet-pull-65 { - left: -65%; - } - .tablet-grid-70 { - float: left; - width: 70%; - } - .tablet-push-70 { - left: 70%; - } - .tablet-pull-70 { - left: -70%; - } - .tablet-grid-75 { - float: left; - width: 75%; - } - .tablet-push-75 { - left: 75%; - } - .tablet-pull-75 { - left: -75%; - } - .tablet-grid-80 { - float: left; - width: 80%; - } - .tablet-push-80 { - left: 80%; - } - .tablet-pull-80 { - left: -80%; - } - .tablet-grid-85 { - float: left; - width: 85%; - } - .tablet-push-85 { - left: 85%; - } - .tablet-pull-85 { - left: -85%; - } - .tablet-suffix-33 { - margin-right: 33.33333%; - } - .tablet-push-33 { - left: 33.33333%; - } - .tablet-pull-33 { - left: -33.33333%; - } - .tablet-grid-66 { - float: left; - width: 66.66667%; - } - .tablet-push-66 { - left: 66.66667%; - } - .tablet-pull-66 { - left: -66.66667%; - } - .tablet-grid-100 { - clear: both; - width: 100%; - } - /* GP specific grid */ - .inside-footer-widgets > div { - margin-bottom: 50px; - } - .inside-footer-widgets > div:nth-child(odd) { - clear: both; - } - .active-footer-widgets-1 .footer-widget-1, - .active-footer-widgets-3 .footer-widget-3, - .active-footer-widgets-5 .footer-widget-5 { - width: 100%; - margin-bottom: 0; - } - .active-footer-widgets-2 .inside-footer-widgets > div, - .active-footer-widgets-4 .footer-widget-3, - .active-footer-widgets-4 .footer-widget-4 { - margin-bottom: 0; - } -} - -@media (min-width: 1025px) { - .push-15, .pull-15, .push-20, .pull-20, .push-25, .pull-25, .push-30, .pull-30, .push-35, .pull-35, .push-40, .pull-40, .push-45, .pull-45, .push-50, .pull-50, .push-55, .pull-55, .push-60, .pull-60, .push-65, .pull-65, .push-70, .pull-70, .push-75, .pull-75, .push-80, .pull-80, .push-85, .pull-85, .push-90, .pull-90, .push-95, .pull-95, .push-33, .pull-33, .push-66, .pull-66 { - position: relative; - } - .hide-on-desktop { - display: none !important; - } - .grid-15 { - float: left; - width: 15%; - } - .push-15 { - left: 15%; - } - .pull-15 { - left: -15%; - } - .grid-20 { - float: left; - width: 20%; - } - .push-20 { - left: 20%; - } - .pull-20 { - left: -20%; - } - .grid-25 { - float: left; - width: 25%; - } - .push-25 { - left: 25%; - } - .pull-25 { - left: -25%; - } - .grid-30 { - float: left; - width: 30%; - } - .push-30 { - left: 30%; - } - .pull-30 { - left: -30%; - } - .grid-35 { - float: left; - width: 35%; - } - .push-35 { - left: 35%; - } - .pull-35 { - left: -35%; - } - .grid-40 { - float: left; - width: 40%; - } - .push-40 { - left: 40%; - } - .pull-40 { - left: -40%; - } - .grid-45 { - float: left; - width: 45%; - } - .push-45 { - left: 45%; - } - .pull-45 { - left: -45%; - } - .grid-50 { - float: left; - width: 50%; - } - .push-50 { - left: 50%; - } - .pull-50 { - left: -50%; - } - .grid-55 { - float: left; - width: 55%; - } - .push-55 { - left: 55%; - } - .pull-55 { - left: -55%; - } - .grid-60 { - float: left; - width: 60%; - } - .push-60 { - left: 60%; - } - .pull-60 { - left: -60%; - } - .grid-65 { - float: left; - width: 65%; - } - .push-65 { - left: 65%; - } - .pull-65 { - left: -65%; - } - .grid-70 { - float: left; - width: 70%; - } - .push-70 { - left: 70%; - } - .pull-70 { - left: -70%; - } - .grid-75 { - float: left; - width: 75%; - } - .push-75 { - left: 75%; - } - .pull-75 { - left: -75%; - } - .grid-80 { - float: left; - width: 80%; - } - .push-80 { - left: 80%; - } - .pull-80 { - left: -80%; - } - .grid-85 { - float: left; - width: 85%; - } - .push-85 { - left: 85%; - } - .pull-85 { - left: -85%; - } - .grid-33 { - float: left; - width: 33.33333%; - } - .push-33 { - left: 33.33333%; - } - .pull-33 { - left: -33.33333%; - } - .grid-66 { - float: left; - width: 66.66667%; - } - .push-66 { - left: 66.66667%; - } - .pull-66 { - left: -66.66667%; - } - .grid-100 { - clear: both; - width: 100%; - } -} - -/*-------------------------------------------------------------- ->>> TABLE OF CONTENTS: ----------------------------------------------------------------- -# Reset -# Elements -# Forms -# Links -# Alignments -# Accessibility -# Clearings -# Navigation - # Mobile Menu - # Navigation Search - # Dropdown Menus - # Sidebar Navigation - # Navigation Layout -# Post Navigation -# Header -# Post Content -# Widgets -# Content Layout -# Footer -# Featured Images -# Top Bar -# Icons -# Compatibility ---------------------------------------------------------------*/ -/*-------------------------------------------------------------- -# Reset ---------------------------------------------------------------*/ -html, -body, -div, -span, -applet, -object, -iframe, -h1, -h2, -h3, -h4, -h5, -h6, -p, -blockquote, -pre, -a, -abbr, -acronym, -address, -big, -cite, -code, -del, -dfn, -em, -font, -ins, -kbd, -q, -s, -samp, -small, -strike, -strong, -sub, -sup, -tt, -var, -dl, -dt, -dd, -ol, -ul, -li, -fieldset, -form, -label, -legend, -table, -caption, -tbody, -tfoot, -thead, -tr, -th, -td { - border: 0; - margin: 0; - padding: 0; -} - -html { - font-family: sans-serif; - -webkit-text-size-adjust: 100%; - -ms-text-size-adjust: 100%; -} - -article, -aside, -details, -figcaption, -figure, -footer, -header, -main, -nav, -section { - display: block; -} - -audio, -canvas, -progress, -video { - display: inline-block; - vertical-align: baseline; -} - -audio:not([controls]) { - display: none; - height: 0; -} - -[hidden], -template { - display: none; -} - -ol, -ul { - list-style: none; -} - -table { - /* tables still need 'cellspacing="0"' in the markup */ - border-collapse: separate; - border-spacing: 0; -} - -caption, -th, -td { - font-weight: normal; - text-align: left; - padding: 5px; -} - -blockquote:before, -blockquote:after, -q:before, -q:after { - content: ""; -} - -a { - background-color: transparent; -} - -a img { - border: 0; -} - -/*-------------------------------------------------------------- -# Elements ---------------------------------------------------------------*/ -body, -button, -input, -select, -textarea { - font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; - font-weight: normal; - text-transform: none; - font-size: 17px; - line-height: 1.5; -} - -p { - margin-bottom: 1.5em; -} - -h1, -h2, -h3, -h4, -h5, -h6 { - font-family: inherit; - font-size: 100%; - font-style: inherit; - font-weight: inherit; -} - -pre { - background: rgba(0, 0, 0, 0.05); - font-family: inherit; - font-size: inherit; - line-height: normal; - margin-bottom: 1.5em; - padding: 20px; - overflow: auto; - max-width: 100%; -} - -blockquote { - border-left: 5px solid rgba(0, 0, 0, 0.05); - padding: 20px; - font-size: 1.2em; - font-style: italic; - margin: 0 0 1.5em; - position: relative; -} - -blockquote p:last-child { - margin: 0; -} - -table, -th, -td { - border: 1px solid rgba(0, 0, 0, 0.1); -} - -table { - border-collapse: separate; - border-spacing: 0; - border-width: 1px 0 0 1px; - margin: 0 0 1.5em; - width: 100%; -} - -th, -td { - padding: 8px; -} - -th { - border-width: 0 1px 1px 0; -} - -td { - border-width: 0 1px 1px 0; -} - -hr { - background-color: rgba(0, 0, 0, 0.1); - border: 0; - height: 1px; - margin-bottom: 40px; - margin-top: 40px; -} - -fieldset { - padding: 0; - border: 0; - min-width: inherit; -} - -fieldset legend { - padding: 0; - margin-bottom: 1.5em; -} - -h1 { - font-size: 42px; - margin-bottom: 20px; - line-height: 1.2em; - font-weight: normal; - text-transform: none; -} - -h2 { - font-size: 35px; - margin-bottom: 20px; - line-height: 1.2em; - font-weight: normal; - text-transform: none; -} - -h3 { - font-size: 29px; - margin-bottom: 20px; - line-height: 1.2em; - font-weight: normal; - text-transform: none; -} - -h4 { - font-size: 24px; -} - -h5 { - font-size: 20px; -} - -h4, -h5, -h6 { - margin-bottom: 20px; -} - -ul, -ol { - margin: 0 0 1.5em 3em; -} - -ul { - list-style: disc; -} - -ol { - list-style: decimal; -} - -li > ul, -li > ol { - margin-bottom: 0; - margin-left: 1.5em; -} - -dt { - font-weight: bold; -} - -dd { - margin: 0 1.5em 1.5em; -} - -b, -strong { - font-weight: bold; -} - -dfn, -cite, -em, -i { - font-style: italic; -} - -address { - margin: 0 0 1.5em; -} - -code, -kbd, -tt, -var { - font: 15px Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace; -} - -abbr, -acronym { - border-bottom: 1px dotted #666; - cursor: help; -} - -mark, -ins { - text-decoration: none; -} - -sup, -sub { - font-size: 75%; - height: 0; - line-height: 0; - position: relative; - vertical-align: baseline; -} - -sup { - bottom: 1ex; -} - -sub { - top: .5ex; -} - -small { - font-size: 75%; -} - -big { - font-size: 125%; -} - -figure { - margin: 0; -} - -table { - margin: 0 0 1.5em; - width: 100%; -} - -th { - font-weight: bold; -} - -img { - height: auto; - /* Make sure images are scaled correctly. */ - max-width: 100%; - /* Adhere to container width. */ -} - -/*-------------------------------------------------------------- -# 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: baseline; - /* Improves appearance and consistency in all browsers */ - *vertical-align: middle; - /* Improves appearance and consistency in all browsers */ -} - -button, -html input[type="button"], -input[type="reset"], -input[type="submit"] { - border: 1px solid transparent; - background: #55555e; - cursor: pointer; - /* Improves usability and consistency of cursor style between image-type 'input' and others */ - -webkit-appearance: button; - /* Corrects inability to style clickable 'input' types in iOS */ - padding: 10px 20px; - color: #FFF; -} - -input[type="checkbox"], -input[type="radio"] { - box-sizing: border-box; - /* Addresses box sizing set to content-box in IE8/9 */ - padding: 0; - /* Addresses excess padding in IE8/9 */ -} - -input[type="search"] { - -webkit-appearance: textfield; - /* Addresses appearance set to searchfield in S5, Chrome */ - box-sizing: content-box; -} - -input[type="search"]::-webkit-search-decoration { - /* Corrects inner padding displayed oddly in S5, Chrome on OSX */ - -webkit-appearance: none; -} - -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"], -input[type="tel"], -input[type="number"], -textarea, -select { - background: #FAFAFA; - color: #666; - border: 1px solid #ccc; - border-radius: 0px; - padding: 10px 15px; - box-sizing: border-box; - max-width: 100%; -} - -textarea { - overflow: auto; - /* Removes default vertical scrollbar in IE6/7/8/9 */ - vertical-align: top; - /* Improves readability and alignment in all browsers */ - width: 100%; -} - -input[type="file"] { - max-width: 100%; - box-sizing: border-box; -} - -/*-------------------------------------------------------------- -# Links ---------------------------------------------------------------*/ -a, -button, -input { - transition: color 0.1s ease-in-out, background-color 0.1s ease-in-out; -} - -a, -a:visited, -a:hover, -a:focus { - text-decoration: none; -} - -.button, -.wp-block-button .wp-block-button__link { - padding: 10px 20px; - display: inline-block; -} - -.wp-block-button .wp-block-button__link { - font-size: inherit; - line-height: inherit; -} - -.using-mouse :focus { - outline: 0; -} - -.using-mouse ::-moz-focus-inner { - border: 0; -} - -/*-------------------------------------------------------------- -# Alignments ---------------------------------------------------------------*/ -.alignleft { - float: left; - margin-right: 1.5em; -} - -.alignright { - float: right; - margin-left: 1.5em; -} - -.aligncenter { - clear: both; - display: block; - margin: 0 auto; -} - -.size-auto, -.size-full, -.size-large, -.size-medium, -.size-thumbnail { - max-width: 100%; - height: auto; -} - -.no-sidebar .entry-content .alignfull { - margin-left: calc( -100vw / 2 + 100% / 2); - margin-right: calc( -100vw / 2 + 100% / 2); - max-width: 100vw; - width: auto; -} - -/*-------------------------------------------------------------- -# Accessibility ---------------------------------------------------------------*/ -.screen-reader-text { - border: 0; - clip: rect(1px, 1px, 1px, 1px); - -webkit-clip-path: inset(50%); - clip-path: inset(50%); - height: 1px; - margin: -1px; - overflow: hidden; - padding: 0; - position: absolute !important; - width: 1px; - word-wrap: normal !important; -} - -.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; - -webkit-clip-path: none; - clip-path: none; - color: #21759b; - display: block; - font-size: 0.875rem; - font-weight: 700; - height: auto; - left: 5px; - line-height: normal; - padding: 15px 23px 14px; - text-decoration: none; - top: 5px; - width: auto; - z-index: 100000; -} - -/* Do not show the outline on the skip link target. */ -#primary[tabindex="-1"]:focus { - outline: 0; -} - -/*-------------------------------------------------------------- -# Clearings ---------------------------------------------------------------*/ -.clear:after, -.entry-content:after, -.comment-content:after, -.site-header:after, -.site-content:after, -.paging-navigation:after, -.site-footer:after, -.site-info:after, -.page-header-content-container:after, -.inside-navigation:not(.grid-container):after, -.inside-header:not(.grid-container):after, -.inside-top-bar:not(.grid-container):after, -.inside-footer-widgets:not(.grid-container):after { - content: ""; - display: table; - clear: both; -} - -/*-------------------------------------------------------------- -# Navigation ---------------------------------------------------------------*/ -.main-navigation { - z-index: 100; - padding: 0; - clear: both; - display: block; -} - -.main-navigation a { - display: block; - text-decoration: none; - font-weight: normal; - text-transform: none; - font-size: 15px; -} - -.main-navigation ul { - list-style: none; - margin: 0; - padding-left: 0; -} - -.main-navigation .main-nav ul li a { - padding-left: 20px; - padding-right: 20px; - line-height: 60px; -} - -.inside-navigation { - position: relative; -} - -.main-navigation li { - float: left; - position: relative; -} - -.sf-menu > li.menu-item-float-right { - float: right !important; -} - -.nav-float-right .inside-header .main-navigation { - float: right; - clear: right; -} - -.nav-float-left .inside-header .main-navigation { - float: left; - clear: left; -} - -.nav-aligned-right .main-navigation:not(.toggled) .menu > li, -.nav-aligned-center .main-navigation:not(.toggled) .menu > li { - float: none; - display: inline-block; -} - -.nav-aligned-right .main-navigation:not(.toggled) ul, -.nav-aligned-center .main-navigation:not(.toggled) ul { - letter-spacing: -0.31em; - font-size: 1em; -} - -.nav-aligned-right .main-navigation:not(.toggled) ul li, -.nav-aligned-center .main-navigation:not(.toggled) ul li { - letter-spacing: normal; -} - -.nav-aligned-center .main-navigation { - text-align: center; -} - -.nav-aligned-right .main-navigation { - text-align: right; -} - -.main-navigation li.search-item { - float: right; -} - -.main-navigation .mobile-bar-items a { - padding-left: 20px; - padding-right: 20px; - line-height: 60px; -} - -/*-------------------------------------------------------------- -## Dropdown Menus ---------------------------------------------------------------*/ -.main-navigation ul ul { - display: block; - box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.1); - float: left; - position: absolute; - left: -99999px; - opacity: 0; - z-index: 99999; - width: 200px; - text-align: left; - top: auto; - transition: opacity 80ms linear; - transition-delay: 0s; - pointer-events: none; - height: 0; - overflow: hidden; -} - -.main-navigation ul ul a { - display: block; -} - -.main-navigation ul ul li { - width: 100%; -} - -.main-navigation .main-nav ul ul li a { - line-height: normal; - padding: 10px 20px; - font-size: 14px; -} - -.main-navigation .main-nav ul li.menu-item-has-children > a { - padding-right: 0; - position: relative; -} - -.main-navigation.sub-menu-left .sub-menu { - right: 0; -} - -.main-navigation:not(.toggled) ul li:hover > ul, -.main-navigation:not(.toggled) ul li.sfHover > ul { - left: auto; - opacity: 1; - transition-delay: 150ms; - pointer-events: auto; - height: auto; - overflow: visible; -} - -.main-navigation:not(.toggled) ul ul li:hover > ul, -.main-navigation:not(.toggled) ul ul li.sfHover > ul { - left: 100%; - top: 0; -} - -.main-navigation.sub-menu-left:not(.toggled) ul ul li:hover > ul, -.main-navigation.sub-menu-left:not(.toggled) ul ul li.sfHover > ul { - right: 100%; - left: auto; -} - -.nav-float-right .main-navigation ul ul ul { - top: 0; -} - -.menu-item-has-children .dropdown-menu-toggle { - display: inline-block; - height: 100%; - clear: both; - padding-right: 20px; - padding-left: 10px; -} - -.menu-item-has-children ul .dropdown-menu-toggle { - padding-top: 10px; - padding-bottom: 10px; - margin-top: -10px; -} - -nav ul ul .menu-item-has-children .dropdown-menu-toggle, -.sidebar .menu-item-has-children .dropdown-menu-toggle { - float: right; -} - -/*-------------------------------------------------------------- -## Sidebar Navigation ---------------------------------------------------------------*/ -.widget-area .main-navigation li { - float: none; - display: block; - width: 100%; - padding: 0; - margin: 0; -} - -.sidebar .main-navigation.sub-menu-right ul li:hover ul, -.sidebar .main-navigation.sub-menu-right ul li.sfHover ul { - top: 0; - left: 100%; -} - -.sidebar .main-navigation.sub-menu-left ul li:hover ul, -.sidebar .main-navigation.sub-menu-left ul li.sfHover ul { - top: 0; - right: 100%; -} - -/*-------------------------------------------------------------- -# Post Navigation ---------------------------------------------------------------*/ -.site-main .comment-navigation, -.site-main .posts-navigation, -.site-main .post-navigation { - margin: 0 0 2em; - overflow: hidden; -} - -.site-main .post-navigation { - margin-bottom: 0; -} - -.paging-navigation .nav-previous, -.paging-navigation .nav-next { - display: none; -} - -.paging-navigation .nav-links > * { - padding: 0 5px; -} - -.paging-navigation .nav-links .current { - font-weight: bold; -} - -/* Less specific so we don't overwrite existing customizations. */ -.nav-links > *:first-child { - padding-left: 0; -} - -/*-------------------------------------------------------------- -# Header ---------------------------------------------------------------*/ -.site-header { - position: relative; -} - -.inside-header { - padding: 20px 40px; -} - -.main-title { - margin: 0; - font-size: 25px; - line-height: 1.2em; - word-wrap: break-word; - font-weight: bold; - text-transform: none; -} - -.site-description { - margin: 0; - line-height: 1.5; - font-weight: normal; - text-transform: none; - font-size: 15px; -} - -.site-logo { - display: inline-block; - max-width: 100%; -} - -.site-header .header-image { - vertical-align: middle; -} - -.header-widget { - float: right; - overflow: hidden; - max-width: 50%; -} - -.header-widget .widget { - padding: 0 0 20px; - margin-bottom: 0; -} - -.header-widget .widget:last-child { - padding-bottom: 0; -} - -.header-widget .widget-title { - margin-bottom: 15px; -} - -.nav-float-right .header-widget { - position: relative; - top: -10px; -} - -.nav-float-right .header-widget .widget { - padding: 0 0 10px; -} - -.nav-float-left .inside-header .site-branding, -.nav-float-left .inside-header .site-logo { - float: right; - clear: right; -} - -.nav-float-left .inside-header:after { - clear: both; - content: ''; - display: table; -} - -.nav-float-right .inside-header .site-branding { - display: inline-block; -} - -.site-branding-container { - display: inline-flex; - align-items: center; - text-align: left; -} - -.site-branding-container .site-logo { - margin-right: 1.5em; -} - -.header-aligned-center .site-header { - text-align: center; -} - -.header-aligned-right .site-header { - text-align: right; -} - -.header-aligned-right .site-branding-container { - text-align: right; -} - -.header-aligned-right .site-branding-container .site-logo { - order: 10; - margin-right: 0; - margin-left: 1.5em; -} - -/*-------------------------------------------------------------- -# Post Content ---------------------------------------------------------------*/ -.sticky { - display: block; -} - -.posted-on .updated, -.entry-header .gp-icon { - display: none; -} - -.byline, -.single .byline, -.group-blog .byline, -.entry-header .cat-links, -.entry-header .tags-links, -.entry-header .comments-link { - display: inline; -} - -footer.entry-meta .byline, -footer.entry-meta .posted-on { - display: block; -} - -.page-content:not(:first-child), -.entry-content:not(:first-child), -.entry-summary:not(:first-child) { - margin-top: 2em; -} - -.page-links { - clear: both; - margin: 0 0 1.5em; -} - -.blog .format-status .entry-title, -.archive .format-status .entry-title, -.blog .format-aside .entry-header, -.archive .format-aside .entry-header, -.blog .format-status .entry-header, -.archive .format-status .entry-header, -.blog .format-status .entry-meta, -.archive .format-status .entry-meta { - display: none; -} - -.blog .format-aside .entry-content, -.archive .format-aside .entry-content, -.blog .format-status .entry-content, -.archive .format-status .entry-content { - margin-top: 0; -} - -.blog .format-status .entry-content p:last-child, -.archive .format-status .entry-content p:last-child { - margin-bottom: 0; -} - -.site-content, -.entry-header { - word-wrap: break-word; -} - -.entry-title { - margin-bottom: 0; -} - -.author .page-header .page-title { - display: flex; - align-items: center; -} - -.author .page-header .avatar { - margin-right: 20px; -} - -.page-header > *:last-child, -.page-header .author-info > *:last-child { - margin-bottom: 0; -} - -.entry-meta { - font-size: 85%; - margin-top: .5em; - line-height: 1.5; -} - -footer.entry-meta { - margin-top: 2em; -} - -.cat-links, -.tags-links, -.comments-link { - display: block; -} - -.taxonomy-description p:last-child, -.read-more-container, -.page-content > p:last-child, -.entry-content > p:last-child, -.entry-summary > p:last-child { - margin-bottom: 0; -} - -/*-------------------------------------------------------------- -# Media ---------------------------------------------------------------*/ -/*-------------------------------------------------------------- -## Captions ---------------------------------------------------------------*/ -.wp-caption { - margin-bottom: 1.5em; - max-width: 100%; - position: relative; -} - -.wp-caption img[class*="wp-image-"] { - display: block; - margin: 0 auto 0; - max-width: 100%; -} - -.wp-caption .wp-caption-text { - font-size: 75%; - padding-top: 5px; - opacity: 0.8; -} - -.wp-caption img { - position: relative; - vertical-align: bottom; -} - -.wp-block-image figcaption { - font-size: 13px; - text-align: center; -} - -/*-------------------------------------------------------------- -## Galleries ---------------------------------------------------------------*/ -.wp-block-gallery, -ul.blocks-gallery-grid { - margin-left: 0; -} - -.wp-block-gallery .blocks-gallery-image figcaption, -.wp-block-gallery .blocks-gallery-item figcaption { - background: rgba(255, 255, 255, 0.7); - color: #000; - padding: 10px; - box-sizing: border-box; -} - -.gallery { - margin-bottom: 1.5em; -} - -.gallery-item { - display: inline-block; - text-align: center; - vertical-align: top; - width: 100%; -} - -.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; -} - -.site-main .gallery { - margin-bottom: 1.5em; -} - -.gallery-item img { - vertical-align: bottom; -} - -.gallery-icon { - padding: 5px; -} - -embed, -iframe, -object { - max-width: 100%; -} - -/*-------------------------------------------------------------- -# Comments ---------------------------------------------------------------*/ -.comment-content a { - word-wrap: break-word; -} - -.bypostauthor { - display: block; -} - -.comment, -.comment-list { - list-style-type: none; - padding: 0; - margin: 0; -} - -.comment-author-info { - display: inline-block; - vertical-align: middle; -} - -.comment-meta .avatar { - float: left; - margin-right: 10px; - border-radius: 50%; -} - -.comment-author cite { - font-style: normal; - font-weight: bold; -} - -.entry-meta.comment-metadata { - margin-top: 0; -} - -.comment-content { - margin-top: 1.5em; -} - -.comment-respond { - margin-top: 0; -} - -.comment-form > .form-submit { - margin-bottom: 0; -} - -.comment-form input, -.comment-form-comment { - margin-bottom: 10px; -} - -.comment-form #author, -.comment-form #email, -.comment-form #url { - display: block; -} - -.comment-metadata .edit-link:before { - display: none; -} - -.comment-body { - padding: 30px 0; -} - -.comment-content { - padding: 30px; - border: 1px solid rgba(0, 0, 0, 0.05); -} - -.depth-1.parent > .children { - border-bottom: 1px solid rgba(0, 0, 0, 0.05); -} - -.comment .children { - padding-left: 30px; - margin-top: -30px; - border-left: 1px solid rgba(0, 0, 0, 0.05); -} - -.pingback .comment-body, -.trackback .comment-body { - border-bottom: 1px solid rgba(0, 0, 0, 0.05); -} - -.pingback .edit-link { - font-size: 13px; -} - -.comment-content p:last-child { - margin-bottom: 0; -} - -.comment-list > .comment:first-child { - padding-top: 0; - margin-top: 0; - border-top: 0; -} - -ol.comment-list { - margin-bottom: 1.5em; -} - -.comment-form-cookies-consent { - display: flex; - align-items: center; -} - -.comment-form-cookies-consent input { - margin-right: 0.5em; - margin-bottom: 0; -} - -.one-container .comments-area { - margin-top: 1.5em; -} - -.comment-content .reply { - font-size: 85%; -} - -#cancel-comment-reply-link { - padding-left: 10px; -} - -/*-------------------------------------------------------------- -# Widgets ---------------------------------------------------------------*/ -.widget-area .widget { - padding: 40px; -} - -.widget select { - max-width: 100%; -} - -.sidebar .widget *:last-child, -.footer-widgets .widget *:last-child { - margin-bottom: 0; -} - -.widget-title { - margin-bottom: 30px; - font-size: 20px; - line-height: 1.5; - font-weight: normal; - text-transform: none; -} - -.widget ul, -.widget ol { - margin: 0; -} - -.widget .search-field { - width: 100%; -} - -.widget_search .search-submit { - display: none; -} - -.widget { - margin: 0 0 30px; - box-sizing: border-box; -} - -.widget:last-child, -.separate-containers .widget:last-child { - margin-bottom: 0; -} - -.sidebar .widget, -.footer-widgets .widget { - font-size: 17px; -} - -.widget ul li { - list-style-type: none; - position: relative; - padding-bottom: 5px; -} - -.widget_categories .children { - margin-left: 1.5em; - padding-top: 5px; -} - -.widget_categories .children li:last-child { - padding-bottom: 0; -} - -.widget_nav_menu ul ul, -.widget_pages ul ul { - margin-left: 1em; - margin-top: 5px; -} - -.widget ul li.menu-item-has-children, -.widget ul li.page_item_has_children { - padding-bottom: 0; -} - -#wp-calendar { - table-layout: fixed; - font-size: 80%; -} - -#wp-calendar #prev, -#wp-calendar #prev + .pad { - border-right: 0; -} - -.sidebar .grid-container { - max-width: 100%; - width: 100%; -} - -/*-------------------------------------------------------------- -# Content Layout ---------------------------------------------------------------*/ -.post { - margin: 0 0 2em; -} - -.page-header { - margin-bottom: 30px; -} - -/*-------------------------------------------------------------- -## One Container ---------------------------------------------------------------*/ -.one-container.both-left .inside-left-sidebar, -.one-container.both-right .inside-left-sidebar { - margin-right: 20px; -} - -.one-container.both-left .inside-right-sidebar, -.one-container.both-right .inside-right-sidebar { - margin-left: 20px; -} - -.one-container:not(.page) .inside-article { - padding: 0 0 30px 0; -} - -.one-container.right-sidebar .site-main, -.one-container.both-right .site-main { - margin-right: 40px; -} - -.one-container.left-sidebar .site-main, -.one-container.both-left .site-main { - margin-left: 40px; -} - -.one-container.both-sidebars .site-main { - margin: 0px 40px 0px 40px; -} - -.one-container .site-content { - padding: 40px; -} - -/*-------------------------------------------------------------- -## Separate Containers ---------------------------------------------------------------*/ -.separate-containers .inside-article, -.separate-containers .comments-area, -.separate-containers .page-header, -.separate-containers .paging-navigation { - padding: 40px; -} - -.separate-containers .widget, -.separate-containers .site-main > *, -.separate-containers .page-header { - margin-bottom: 20px; -} - -.separate-containers .site-main { - margin: 20px; -} - -.separate-containers.no-sidebar .site-main { - margin-left: 0; - margin-right: 0; -} - -.separate-containers.right-sidebar .site-main, -.separate-containers.both-right .site-main { - margin-left: 0; -} - -.separate-containers.left-sidebar .site-main, -.separate-containers.both-left .site-main { - margin-right: 0; -} - -.separate-containers.both-right .inside-left-sidebar, -.separate-containers.both-left .inside-left-sidebar { - margin-right: 10px; -} - -.separate-containers.both-right .inside-right-sidebar, -.separate-containers.both-left .inside-right-sidebar { - margin-left: 10px; -} - -.separate-containers .inside-right-sidebar, -.separate-containers .inside-left-sidebar { - margin-top: 20px; - margin-bottom: 20px; -} - -.inside-page-header, -.wp-block-group__inner-container { - padding: 40px; -} - -.widget-area .main-navigation { - margin-bottom: 20px; -} - -.separate-containers .site-main > *:last-child, -.one-container .site-main > *:last-child { - margin-bottom: 0; -} - -/*-------------------------------------------------------------- -## Full Width Content ---------------------------------------------------------------*/ -.full-width-content .container.grid-container { - max-width: 100%; -} - -.full-width-content.no-sidebar.separate-containers .site-main { - margin: 0; -} - -.full-width-content.separate-containers .inside-article, -.full-width-content.one-container .site-content { - padding: 0; -} - -.full-width-content .entry-content .alignwide { - margin-left: 0; - width: auto; - max-width: unset; -} - -/*-------------------------------------------------------------- -## Contained Content ---------------------------------------------------------------*/ -.contained-content.separate-containers .inside-article, -.contained-content.one-container .site-content { - padding: 0; -} - -/*-------------------------------------------------------------- -# Footer ---------------------------------------------------------------*/ -.site-info { - text-align: center; - font-size: 15px; -} - -.site-info { - padding: 20px 40px; -} - -.footer-widgets { - padding: 40px; -} - -.site-footer .footer-widgets-container .inner-padding { - padding: 0px 0px 0px 40px; -} - -.site-footer .footer-widgets-container .inside-footer-widgets { - margin-left: -40px; -} - -/*-------------------------------------------------------------- -## Footer Bar ---------------------------------------------------------------*/ -.footer-bar-active .footer-bar .widget { - padding: 0; -} - -.footer-bar .widget_nav_menu > div > ul { - display: inline-block; - vertical-align: top; -} - -.footer-bar .widget_nav_menu li { - margin: 0 10px; - float: left; - padding: 0; -} - -.footer-bar .widget_nav_menu li:first-child { - margin-left: 0; -} - -.footer-bar .widget_nav_menu li:last-child { - margin-right: 0; -} - -.footer-bar .widget_nav_menu li ul { - display: none; -} - -.footer-bar .textwidget p:last-child { - margin: 0; -} - -.footer-bar .widget-title { - display: none; -} - -.footer-bar-align-right .copyright-bar { - float: left; -} - -.footer-bar-align-right .footer-bar { - float: right; - text-align: right; -} - -.footer-bar-align-left .copyright-bar { - float: right; - text-align: right; -} - -.footer-bar-align-left .footer-bar { - float: left; - text-align: left; -} - -.footer-bar-align-center .copyright-bar { - float: none; - text-align: center; -} - -.footer-bar-align-center .footer-bar { - float: none; - text-align: center; - margin-bottom: 10px; -} - -/*-------------------------------------------------------------- -# Featured Images ---------------------------------------------------------------*/ -.post-image:not(:first-child) { - margin-top: 2em; -} - -.page-header-image, -.page-header-image-single { - line-height: 0; - /* no more weird spacing */ -} - -.separate-containers .inside-article > [class*="page-header-"], -.one-container .inside-article > [class*="page-header-"] { - margin-bottom: 2em; - margin-top: 0; -} - -.inside-article .page-header-image-single.page-header-below-title { - margin-top: 2em; -} - -.separate-containers .page-header-image, -.separate-containers .page-header-contained, -.separate-containers .page-header-content, -.separate-containers .page-header-image-single, -.separate-containers .page-header-content-single { - margin-top: 20px; -} - -/*-------------------------------------------------------------- -# Top Bar ---------------------------------------------------------------*/ -.top-bar { - font-weight: normal; - text-transform: none; - font-size: 13px; -} - -.top-bar .inside-top-bar .widget { - padding: 0; - display: inline-block; - margin: 0; -} - -.top-bar .inside-top-bar .textwidget p:last-child { - margin: 0; -} - -.top-bar .widget-title { - display: none; -} - -.top-bar .widget_nav_menu li { - margin: 0 10px; - float: left; - padding: 0; -} - -.top-bar .widget_nav_menu li:first-child { - margin-left: 0; -} - -.top-bar .widget_nav_menu li:last-child { - margin-right: 0; -} - -.top-bar .widget_nav_menu li ul { - display: none; -} - -.top-bar .widget_nav_menu > div > ul { - display: inline-block; - vertical-align: top; -} - -.inside-top-bar { - padding: 10px 40px; -} - -.top-bar-align-center { - text-align: center; -} - -.top-bar-align-center .inside-top-bar .widget:not(:first-child) { - margin-left: 10px; -} - -.top-bar-align-center .inside-top-bar .widget:first-child:last-child { - display: block; -} - -.top-bar-align-right { - text-align: right; -} - -.top-bar-align-right .inside-top-bar > .widget:nth-child(even) { - float: left; - margin-right: 10px; -} - -.top-bar-align-right .inside-top-bar > .widget:nth-child(odd) { - margin-left: 10px; -} - -.top-bar-align-left .inside-top-bar > .widget:nth-child(odd) { - float: left; - margin-right: 10px; -} - -.top-bar-align-left .inside-top-bar > .widget:nth-child(even) { - margin-left: 10px; - float: right; -} - -/*-------------------------------------------------------------- -# Icons ---------------------------------------------------------------*/ -.gp-icon { - display: inline-flex; - align-self: center; -} - -.gp-icon svg { - height: 1em; - width: 1em; - top: .125em; - position: relative; - fill: currentColor; -} - -.icon-menu-bars svg:nth-child(2), -.toggled .icon-menu-bars svg:nth-child(1), -.icon-search svg:nth-child(2), -.close-search .icon-search svg:nth-child(1) { - display: none; -} - -.toggled .icon-menu-bars svg:nth-child(2), -.close-search .icon-search svg:nth-child(2) { - display: block; -} - -.entry-meta .gp-icon { - margin-right: 0.6em; - opacity: 0.7; -} - -nav.toggled .icon-arrow-left svg { - transform: rotate(-90deg); -} - -nav.toggled .icon-arrow-right svg { - transform: rotate(90deg); -} - -nav.toggled .sfHover > a > .dropdown-menu-toggle .gp-icon svg { - transform: rotate(180deg); -} - -nav.toggled .sfHover > a > .dropdown-menu-toggle .gp-icon.icon-arrow-left svg { - transform: rotate(-270deg); -} - -nav.toggled .sfHover > a > .dropdown-menu-toggle .gp-icon.icon-arrow-right svg { - transform: rotate(270deg); -} - -/*-------------------------------------------------------------- -# Compatibility ---------------------------------------------------------------*/ -/* Bootstrap fix */ -.container.grid-container { - width: auto; -} - -/* Globally hidden elements when Infinite Scroll is supported and in use. */ -.infinite-scroll .paging-navigation, -.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; -} - -/* SiteOrigin Page Builder */ -.so-panel.widget { - padding: 0; -} - -/* MailChimp CSS */ -#mc_embed_signup .clear { - display: block; - height: auto; - visibility: visible; - width: auto; -} - -/*-------------------------------------------------------------- -# Mobile Menu ---------------------------------------------------------------*/ -.menu-toggle, -.mobile-bar-items, -.sidebar-nav-mobile { - display: none; -} - -.menu-toggle { - padding: 0 20px; - line-height: 60px; - margin: 0; - font-weight: normal; - text-transform: none; - font-size: 15px; - cursor: pointer; -} - -button.menu-toggle { - background-color: transparent; - width: 100%; - border: 0; - text-align: center; -} - -button.menu-toggle:hover, -button.menu-toggle:active, -button.menu-toggle:focus { - background-color: transparent; -} - -.menu-toggle .mobile-menu { - padding-left: 3px; -} - -.menu-toggle .gp-icon + .mobile-menu { - padding-left: 9px; -} - -.menu-toggle .mobile-menu:empty { - display: none; -} - -.nav-search-enabled .main-navigation .menu-toggle { - text-align: left; -} - -.mobile-bar-items { - display: none; - position: absolute; - right: 0; - top: 0; - z-index: 21; - list-style-type: none; -} - -.mobile-bar-items a { - display: inline-block; -} - -nav.toggled ul ul.sub-menu { - width: 100%; -} - -.dropdown-hover .main-navigation.toggled ul li:hover > ul, -.dropdown-hover .main-navigation.toggled ul li.sfHover > ul { - transition-delay: 0s; -} - -.toggled .menu-item-has-children .dropdown-menu-toggle { - padding-left: 20px; -} - -.main-navigation.toggled ul ul { - transition: 0s; - visibility: hidden; -} - -.main-navigation.toggled .main-nav > ul { - display: block; -} - -.main-navigation.toggled .main-nav ul ul.toggled-on { - position: relative; - top: 0; - left: auto !important; - right: auto !important; - width: 100%; - pointer-events: auto; - height: auto; - opacity: 1; - display: block; - visibility: visible; - float: none; -} - -.main-navigation.toggled .main-nav li { - float: none; - clear: both; - display: block; - text-align: left; -} - -.main-navigation.toggled .main-nav li.hide-on-mobile { - display: none !important; -} - -.main-navigation.toggled .menu-item-has-children .dropdown-menu-toggle { - float: right; -} - -.main-navigation.toggled .menu li.search-item { - display: none !important; -} - -.main-navigation.toggled .sf-menu > li.menu-item-float-right { - float: none; - display: inline-block; -} - -/*-------------------------------------------------------------- -# Breakpoint (768px) ---------------------------------------------------------------*/ -@media (max-width: 768px) { - /*-------------------------------------------------------------- - ## Links - --------------------------------------------------------------*/ - a, body, button, input, select, textarea { - transition: all 0s ease-in-out; - } - /*-------------------------------------------------------------- - ## Top Bar - --------------------------------------------------------------*/ - .top-bar.top-bar-align-left, - .top-bar.top-bar-align-right { - text-align: center; - } - .top-bar .widget { - float: none !important; - margin: 0 10px !important; - } - .top-bar .widget_nav_menu li { - float: none; - display: inline-block; - padding: 5px 0; - } - .footer-bar .widget_nav_menu li:first-child { - margin-left: 10px; - } - .footer-bar .widget_nav_menu li:last-child { - margin-right: 10px; - } - /*-------------------------------------------------------------- - ## Header - --------------------------------------------------------------*/ - .inside-header > *:not(:last-child):not(.main-navigation) { - margin-bottom: 20px; - } - .site-header, - .header-aligned-right .site-header { - text-align: center; - } - .header-widget { - float: none; - max-width: 100%; - text-align: center; - } - /*-------------------------------------------------------------- - ## Content Area - --------------------------------------------------------------*/ - .sidebar, - .content-area, - .inside-footer-widgets > div { - float: none; - width: 100%; - left: 0; - right: 0; - } - .site-main { - margin-left: 0 !important; - margin-right: 0 !important; - } - body:not(.no-sidebar) .site-main { - margin-bottom: 0 !important; - } - .one-container .sidebar { - margin-top: 40px; - } - .separate-containers #left-sidebar + #right-sidebar .inside-right-sidebar { - margin-top: 0; - } - .both-right.separate-containers .inside-left-sidebar, - .both-left.separate-containers .inside-left-sidebar, - .both-right.separate-containers .inside-right-sidebar, - .both-left.separate-containers .inside-right-sidebar { - margin-right: 0; - margin-left: 0; - } - .alignleft, - .alignright { - float: none; - display: block; - margin-left: auto; - margin-right: auto; - } - .post-image-aligned-left .post-image, - .post-image-aligned-right .post-image { - float: none; - margin: 2em 0; - text-align: center; - } - .comment .children { - padding-left: 10px; - margin-left: 0; - } - .edd_download { - display: block; - float: none !important; - margin-bottom: 1.5em; - width: 100% !important; - } - .entry-meta { - font-size: inherit; - } - .entry-meta a { - line-height: 1.8em; - } - /*-------------------------------------------------------------- - ## Footer - --------------------------------------------------------------*/ - .site-info { - text-align: center; - } - .copyright-bar { - float: none !important; - text-align: center !important; - } - .footer-bar { - float: none !important; - text-align: center !important; - margin-bottom: 20px; - } - .footer-bar .widget_nav_menu li { - float: none; - display: inline-block; - padding: 5px 0; - } - .inside-footer-widgets > div:not(:last-child) { - margin-bottom: 40px; - } - .site-footer .footer-widgets .footer-widgets-container .inside-footer-widgets { - margin: 0; - } - .site-footer .footer-widgets .footer-widgets-container .inner-padding { - padding: 0; - } -} +.grid-container:before, .grid-15:before, .grid-20:before, .grid-25:before, .grid-30:before, .grid-35:before, .grid-40:before, .grid-45:before, .grid-50:before, .grid-55:before, .grid-60:before, .grid-65:before, .grid-70:before, .grid-75:before, .grid-80:before, .grid-85:before, .grid-100:before, .grid-33:before, .grid-66:before, [class*="mobile-grid-"]:before, [class*="tablet-grid-"]:before, .clearfix:before, +.grid-container:after, +.grid-15:after, +.grid-20:after, +.grid-25:after, +.grid-30:after, +.grid-35:after, +.grid-40:after, +.grid-45:after, +.grid-50:after, +.grid-55:after, +.grid-60:after, +.grid-65:after, +.grid-70:after, +.grid-75:after, +.grid-80:after, +.grid-85:after, +.grid-100:after, +.grid-33:after, +.grid-66:after, +[class*="mobile-grid-"]:after, +[class*="tablet-grid-"]:after, +.clearfix:after { + content: "."; + display: block; + overflow: hidden; + visibility: hidden; + font-size: 0; + line-height: 0; + width: 0; + height: 0; +} + +.grid-container:after, .grid-15:after, .grid-20:after, .grid-25:after, .grid-30:after, .grid-35:after, .grid-40:after, .grid-45:after, .grid-50:after, .grid-55:after, .grid-60:after, .grid-65:after, .grid-70:after, .grid-75:after, .grid-80:after, .grid-85:after, .grid-90:after, .grid-95:after, .grid-100:after, .grid-33:after, .grid-66:after, [class*="mobile-grid-"]:after, [class*="tablet-grid-"]:after, .clearfix:after { + clear: both; +} + +.grid-container { + margin-left: auto; + margin-right: auto; + max-width: 1200px; + padding-left: 10px; + padding-right: 10px; +} + +.grid-15, .grid-20, .grid-25, .grid-30, .grid-35, .grid-40, .grid-45, .grid-50, .grid-55, .grid-60, .grid-65, .grid-70, .grid-75, .grid-80, .grid-85, .grid-90, .grid-95, .grid-100, .grid-33, .grid-66, [class*="mobile-grid-"], [class*="tablet-grid-"] { + box-sizing: border-box; + padding-left: 10px; + padding-right: 10px; +} + +.grid-parent { + padding-left: 0; + padding-right: 0; +} + +@media (max-width: 767px) { + .hide-on-mobile { + display: none !important; + } + .mobile-grid-50 { + float: left; + width: 50%; + } + .mobile-grid-100 { + clear: both; + width: 100%; + } +} + +@media (min-width: 768px) and (max-width: 1024px) { + [class*="tablet-push-"], + [class*="tablet-pull-"] { + position: relative; + } + .hide-on-tablet { + display: none !important; + } + .tablet-grid-15 { + float: left; + width: 15%; + } + .tablet-push-15 { + left: 15%; + } + .tablet-pull-15 { + left: -15%; + } + .tablet-grid-20 { + float: left; + width: 20%; + } + .tablet-push-20 { + left: 20%; + } + .tablet-pull-20 { + left: -20%; + } + .tablet-grid-25 { + float: left; + width: 25%; + } + .tablet-push-25 { + left: 25%; + } + .tablet-pull-25 { + left: -25%; + } + .tablet-grid-30 { + float: left; + width: 30%; + } + .tablet-push-30 { + left: 30%; + } + .tablet-pull-30 { + left: -30%; + } + .tablet-grid-35 { + float: left; + width: 35%; + } + .tablet-push-35 { + left: 35%; + } + .tablet-pull-35 { + left: -35%; + } + .tablet-grid-40 { + float: left; + width: 40%; + } + .tablet-push-40 { + left: 40%; + } + .tablet-pull-40 { + left: -40%; + } + .tablet-grid-45 { + float: left; + width: 45%; + } + .tablet-push-45 { + left: 45%; + } + .tablet-pull-45 { + left: -45%; + } + .tablet-grid-50 { + float: left; + width: 50%; + } + .tablet-push-50 { + left: 50%; + } + .tablet-pull-50 { + left: -50%; + } + .tablet-grid-55 { + float: left; + width: 55%; + } + .tablet-push-55 { + left: 55%; + } + .tablet-pull-55 { + left: -55%; + } + .tablet-grid-60 { + float: left; + width: 60%; + } + .tablet-push-60 { + left: 60%; + } + .tablet-pull-60 { + left: -60%; + } + .tablet-grid-65 { + float: left; + width: 65%; + } + .tablet-push-65 { + left: 65%; + } + .tablet-pull-65 { + left: -65%; + } + .tablet-grid-70 { + float: left; + width: 70%; + } + .tablet-push-70 { + left: 70%; + } + .tablet-pull-70 { + left: -70%; + } + .tablet-grid-75 { + float: left; + width: 75%; + } + .tablet-push-75 { + left: 75%; + } + .tablet-pull-75 { + left: -75%; + } + .tablet-grid-80 { + float: left; + width: 80%; + } + .tablet-push-80 { + left: 80%; + } + .tablet-pull-80 { + left: -80%; + } + .tablet-grid-85 { + float: left; + width: 85%; + } + .tablet-push-85 { + left: 85%; + } + .tablet-pull-85 { + left: -85%; + } + .tablet-suffix-33 { + margin-right: 33.33333%; + } + .tablet-push-33 { + left: 33.33333%; + } + .tablet-pull-33 { + left: -33.33333%; + } + .tablet-grid-66 { + float: left; + width: 66.66667%; + } + .tablet-push-66 { + left: 66.66667%; + } + .tablet-pull-66 { + left: -66.66667%; + } + .tablet-grid-100 { + clear: both; + width: 100%; + } + /* GP specific grid */ + .inside-footer-widgets > div { + margin-bottom: 50px; + } + .inside-footer-widgets > div:nth-child(odd) { + clear: both; + } + .active-footer-widgets-1 .footer-widget-1, + .active-footer-widgets-3 .footer-widget-3, + .active-footer-widgets-5 .footer-widget-5 { + width: 100%; + margin-bottom: 0; + } + .active-footer-widgets-2 .inside-footer-widgets > div, + .active-footer-widgets-4 .footer-widget-3, + .active-footer-widgets-4 .footer-widget-4 { + margin-bottom: 0; + } +} + +@media (min-width: 1025px) { + .push-15, .pull-15, .push-20, .pull-20, .push-25, .pull-25, .push-30, .pull-30, .push-35, .pull-35, .push-40, .pull-40, .push-45, .pull-45, .push-50, .pull-50, .push-55, .pull-55, .push-60, .pull-60, .push-65, .pull-65, .push-70, .pull-70, .push-75, .pull-75, .push-80, .pull-80, .push-85, .pull-85, .push-90, .pull-90, .push-95, .pull-95, .push-33, .pull-33, .push-66, .pull-66 { + position: relative; + } + .hide-on-desktop { + display: none !important; + } + .grid-15 { + float: left; + width: 15%; + } + .push-15 { + left: 15%; + } + .pull-15 { + left: -15%; + } + .grid-20 { + float: left; + width: 20%; + } + .push-20 { + left: 20%; + } + .pull-20 { + left: -20%; + } + .grid-25 { + float: left; + width: 25%; + } + .push-25 { + left: 25%; + } + .pull-25 { + left: -25%; + } + .grid-30 { + float: left; + width: 30%; + } + .push-30 { + left: 30%; + } + .pull-30 { + left: -30%; + } + .grid-35 { + float: left; + width: 35%; + } + .push-35 { + left: 35%; + } + .pull-35 { + left: -35%; + } + .grid-40 { + float: left; + width: 40%; + } + .push-40 { + left: 40%; + } + .pull-40 { + left: -40%; + } + .grid-45 { + float: left; + width: 45%; + } + .push-45 { + left: 45%; + } + .pull-45 { + left: -45%; + } + .grid-50 { + float: left; + width: 50%; + } + .push-50 { + left: 50%; + } + .pull-50 { + left: -50%; + } + .grid-55 { + float: left; + width: 55%; + } + .push-55 { + left: 55%; + } + .pull-55 { + left: -55%; + } + .grid-60 { + float: left; + width: 60%; + } + .push-60 { + left: 60%; + } + .pull-60 { + left: -60%; + } + .grid-65 { + float: left; + width: 65%; + } + .push-65 { + left: 65%; + } + .pull-65 { + left: -65%; + } + .grid-70 { + float: left; + width: 70%; + } + .push-70 { + left: 70%; + } + .pull-70 { + left: -70%; + } + .grid-75 { + float: left; + width: 75%; + } + .push-75 { + left: 75%; + } + .pull-75 { + left: -75%; + } + .grid-80 { + float: left; + width: 80%; + } + .push-80 { + left: 80%; + } + .pull-80 { + left: -80%; + } + .grid-85 { + float: left; + width: 85%; + } + .push-85 { + left: 85%; + } + .pull-85 { + left: -85%; + } + .grid-33 { + float: left; + width: 33.33333%; + } + .push-33 { + left: 33.33333%; + } + .pull-33 { + left: -33.33333%; + } + .grid-66 { + float: left; + width: 66.66667%; + } + .push-66 { + left: 66.66667%; + } + .pull-66 { + left: -66.66667%; + } + .grid-100 { + clear: both; + width: 100%; + } +} + +/*-------------------------------------------------------------- +>>> TABLE OF CONTENTS: +---------------------------------------------------------------- +# Reset +# Elements +# Forms +# Links +# Alignments +# Accessibility +# Clearings +# Navigation + # Mobile Menu + # Navigation Search + # Dropdown Menus + # Sidebar Navigation + # Navigation Layout +# Post Navigation +# Header +# Post Content +# Widgets +# Content Layout +# Footer +# Featured Images +# Top Bar +# Icons +# Compatibility +--------------------------------------------------------------*/ +/*-------------------------------------------------------------- +# Reset +--------------------------------------------------------------*/ +html, +body, +div, +span, +applet, +object, +iframe, +h1, +h2, +h3, +h4, +h5, +h6, +p, +blockquote, +pre, +a, +abbr, +acronym, +address, +big, +cite, +code, +del, +dfn, +em, +font, +ins, +kbd, +q, +s, +samp, +small, +strike, +strong, +sub, +sup, +tt, +var, +dl, +dt, +dd, +ol, +ul, +li, +fieldset, +form, +label, +legend, +table, +caption, +tbody, +tfoot, +thead, +tr, +th, +td { + border: 0; + margin: 0; + padding: 0; +} + +html { + font-family: sans-serif; + -webkit-text-size-adjust: 100%; + -ms-text-size-adjust: 100%; +} + +article, +aside, +details, +figcaption, +figure, +footer, +header, +main, +nav, +section { + display: block; +} + +audio, +canvas, +progress, +video { + display: inline-block; + vertical-align: baseline; +} + +audio:not([controls]) { + display: none; + height: 0; +} + +[hidden], +template { + display: none; +} + +ol, +ul { + list-style: none; +} + +table { + /* tables still need 'cellspacing="0"' in the markup */ + border-collapse: separate; + border-spacing: 0; +} + +caption, +th, +td { + font-weight: normal; + text-align: left; + padding: 5px; +} + +blockquote:before, +blockquote:after, +q:before, +q:after { + content: ""; +} + +a { + background-color: transparent; +} + +a img { + border: 0; +} + +/*-------------------------------------------------------------- +# Elements +--------------------------------------------------------------*/ +body, +button, +input, +select, +textarea { + font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; + font-weight: normal; + text-transform: none; + font-size: 17px; + line-height: 1.5; +} + +p { + margin-bottom: 1.5em; +} + +h1, +h2, +h3, +h4, +h5, +h6 { + font-family: inherit; + font-size: 100%; + font-style: inherit; + font-weight: inherit; +} + +pre { + background: rgba(0, 0, 0, 0.05); + font-family: inherit; + font-size: inherit; + line-height: normal; + margin-bottom: 1.5em; + padding: 20px; + overflow: auto; + max-width: 100%; +} + +blockquote { + border-left: 5px solid rgba(0, 0, 0, 0.05); + padding: 20px; + font-size: 1.2em; + font-style: italic; + margin: 0 0 1.5em; + position: relative; +} + +blockquote p:last-child { + margin: 0; +} + +table, +th, +td { + border: 1px solid rgba(0, 0, 0, 0.1); +} + +table { + border-collapse: separate; + border-spacing: 0; + border-width: 1px 0 0 1px; + margin: 0 0 1.5em; + width: 100%; +} + +th, +td { + padding: 8px; +} + +th { + border-width: 0 1px 1px 0; +} + +td { + border-width: 0 1px 1px 0; +} + +hr { + background-color: rgba(0, 0, 0, 0.1); + border: 0; + height: 1px; + margin-bottom: 40px; + margin-top: 40px; +} + +fieldset { + padding: 0; + border: 0; + min-width: inherit; +} + +fieldset legend { + padding: 0; + margin-bottom: 1.5em; +} + +h1 { + font-size: 42px; + margin-bottom: 20px; + line-height: 1.2em; + font-weight: normal; + text-transform: none; +} + +h2 { + font-size: 35px; + margin-bottom: 20px; + line-height: 1.2em; + font-weight: normal; + text-transform: none; +} + +h3 { + font-size: 29px; + margin-bottom: 20px; + line-height: 1.2em; + font-weight: normal; + text-transform: none; +} + +h4 { + font-size: 24px; +} + +h5 { + font-size: 20px; +} + +h4, +h5, +h6 { + margin-bottom: 20px; +} + +ul, +ol { + margin: 0 0 1.5em 3em; +} + +ul { + list-style: disc; +} + +ol { + list-style: decimal; +} + +li > ul, +li > ol { + margin-bottom: 0; + margin-left: 1.5em; +} + +dt { + font-weight: bold; +} + +dd { + margin: 0 1.5em 1.5em; +} + +b, +strong { + font-weight: bold; +} + +dfn, +cite, +em, +i { + font-style: italic; +} + +address { + margin: 0 0 1.5em; +} + +code, +kbd, +tt, +var { + font: 15px Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace; +} + +abbr, +acronym { + border-bottom: 1px dotted #666; + cursor: help; +} + +mark, +ins { + text-decoration: none; +} + +sup, +sub { + font-size: 75%; + height: 0; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sup { + bottom: 1ex; +} + +sub { + top: .5ex; +} + +small { + font-size: 75%; +} + +big { + font-size: 125%; +} + +figure { + margin: 0; +} + +table { + margin: 0 0 1.5em; + width: 100%; +} + +th { + font-weight: bold; +} + +img { + height: auto; + /* Make sure images are scaled correctly. */ + max-width: 100%; + /* Adhere to container width. */ +} + +/*-------------------------------------------------------------- +# 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: baseline; + /* Improves appearance and consistency in all browsers */ + *vertical-align: middle; + /* Improves appearance and consistency in all browsers */ +} + +button, +html input[type="button"], +input[type="reset"], +input[type="submit"] { + border: 1px solid transparent; + background: #55555e; + cursor: pointer; + /* Improves usability and consistency of cursor style between image-type 'input' and others */ + -webkit-appearance: button; + /* Corrects inability to style clickable 'input' types in iOS */ + padding: 10px 20px; + color: #FFF; +} + +input[type="checkbox"], +input[type="radio"] { + box-sizing: border-box; + /* Addresses box sizing set to content-box in IE8/9 */ + padding: 0; + /* Addresses excess padding in IE8/9 */ +} + +input[type="search"] { + -webkit-appearance: textfield; + /* Addresses appearance set to searchfield in S5, Chrome */ + box-sizing: content-box; +} + +input[type="search"]::-webkit-search-decoration { + /* Corrects inner padding displayed oddly in S5, Chrome on OSX */ + -webkit-appearance: none; +} + +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"], +input[type="tel"], +input[type="number"], +textarea, +select { + background: #FAFAFA; + color: #666; + border: 1px solid #ccc; + border-radius: 0px; + padding: 10px 15px; + box-sizing: border-box; + max-width: 100%; +} + +textarea { + overflow: auto; + /* Removes default vertical scrollbar in IE6/7/8/9 */ + vertical-align: top; + /* Improves readability and alignment in all browsers */ + width: 100%; +} + +input[type="file"] { + max-width: 100%; + box-sizing: border-box; +} + +/*-------------------------------------------------------------- +# Links +--------------------------------------------------------------*/ +a, +button, +input { + transition: color 0.1s ease-in-out, background-color 0.1s ease-in-out; +} + +a, +a:visited, +a:hover, +a:focus { + text-decoration: none; +} + +.button, +.wp-block-button .wp-block-button__link { + padding: 10px 20px; + display: inline-block; +} + +.wp-block-button .wp-block-button__link { + font-size: inherit; + line-height: inherit; +} + +.using-mouse :focus { + outline: 0; +} + +.using-mouse ::-moz-focus-inner { + border: 0; +} + +/*-------------------------------------------------------------- +# Alignments +--------------------------------------------------------------*/ +.alignleft { + float: left; + margin-right: 1.5em; +} + +.alignright { + float: right; + margin-left: 1.5em; +} + +.aligncenter { + clear: both; + display: block; + margin: 0 auto; +} + +.size-auto, +.size-full, +.size-large, +.size-medium, +.size-thumbnail { + max-width: 100%; + height: auto; +} + +.no-sidebar .entry-content .alignfull { + margin-left: calc( -100vw / 2 + 100% / 2); + margin-right: calc( -100vw / 2 + 100% / 2); + max-width: 100vw; + width: auto; +} + +/*-------------------------------------------------------------- +# Accessibility +--------------------------------------------------------------*/ +.screen-reader-text { + border: 0; + clip: rect(1px, 1px, 1px, 1px); + -webkit-clip-path: inset(50%); + clip-path: inset(50%); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute !important; + width: 1px; + word-wrap: normal !important; +} + +.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; + -webkit-clip-path: none; + clip-path: none; + color: #21759b; + display: block; + font-size: 0.875rem; + font-weight: 700; + height: auto; + left: 5px; + line-height: normal; + padding: 15px 23px 14px; + text-decoration: none; + top: 5px; + width: auto; + z-index: 100000; +} + +/* Do not show the outline on the skip link target. */ +#primary[tabindex="-1"]:focus { + outline: 0; +} + +/*-------------------------------------------------------------- +# Clearings +--------------------------------------------------------------*/ +.clear:after, +.entry-content:after, +.comment-content:after, +.site-header:after, +.site-content:after, +.paging-navigation:after, +.site-footer:after, +.site-info:after, +.page-header-content-container:after, +.inside-navigation:not(.grid-container):after, +.inside-header:not(.grid-container):after, +.inside-top-bar:not(.grid-container):after, +.inside-footer-widgets:not(.grid-container):after { + content: ""; + display: table; + clear: both; +} + +/*-------------------------------------------------------------- +# Navigation +--------------------------------------------------------------*/ +.main-navigation { + z-index: 100; + padding: 0; + clear: both; + display: block; +} + +.main-navigation a { + display: block; + text-decoration: none; + font-weight: normal; + text-transform: none; + font-size: 15px; +} + +.main-navigation ul { + list-style: none; + margin: 0; + padding-left: 0; +} + +.main-navigation .main-nav ul li a { + padding-left: 20px; + padding-right: 20px; + line-height: 60px; +} + +.inside-navigation { + position: relative; +} + +.main-navigation li { + float: left; + position: relative; +} + +.sf-menu > li.menu-item-float-right { + float: right !important; +} + +.nav-float-right .inside-header .main-navigation { + float: right; + clear: right; +} + +.nav-float-left .inside-header .main-navigation { + float: left; + clear: left; +} + +.nav-aligned-right .main-navigation:not(.toggled) .menu > li, +.nav-aligned-center .main-navigation:not(.toggled) .menu > li { + float: none; + display: inline-block; +} + +.nav-aligned-right .main-navigation:not(.toggled) ul, +.nav-aligned-center .main-navigation:not(.toggled) ul { + letter-spacing: -0.31em; + font-size: 1em; +} + +.nav-aligned-right .main-navigation:not(.toggled) ul li, +.nav-aligned-center .main-navigation:not(.toggled) ul li { + letter-spacing: normal; +} + +.nav-aligned-center .main-navigation { + text-align: center; +} + +.nav-aligned-right .main-navigation { + text-align: right; +} + +.main-navigation li.search-item { + float: right; +} + +.main-navigation .mobile-bar-items a { + padding-left: 20px; + padding-right: 20px; + line-height: 60px; +} + +/*-------------------------------------------------------------- +## Dropdown Menus +--------------------------------------------------------------*/ +.main-navigation ul ul { + display: block; + box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.1); + float: left; + position: absolute; + left: -99999px; + opacity: 0; + z-index: 99999; + width: 200px; + text-align: left; + top: auto; + transition: opacity 80ms linear; + transition-delay: 0s; + pointer-events: none; + height: 0; + overflow: hidden; +} + +.main-navigation ul ul a { + display: block; +} + +.main-navigation ul ul li { + width: 100%; +} + +.main-navigation .main-nav ul ul li a { + line-height: normal; + padding: 10px 20px; + font-size: 14px; +} + +.main-navigation .main-nav ul li.menu-item-has-children > a { + padding-right: 0; + position: relative; +} + +.main-navigation.sub-menu-left .sub-menu { + right: 0; +} + +.main-navigation:not(.toggled) ul li:hover > ul, +.main-navigation:not(.toggled) ul li.sfHover > ul { + left: auto; + opacity: 1; + transition-delay: 150ms; + pointer-events: auto; + height: auto; + overflow: visible; +} + +.main-navigation:not(.toggled) ul ul li:hover > ul, +.main-navigation:not(.toggled) ul ul li.sfHover > ul { + left: 100%; + top: 0; +} + +.main-navigation.sub-menu-left:not(.toggled) ul ul li:hover > ul, +.main-navigation.sub-menu-left:not(.toggled) ul ul li.sfHover > ul { + right: 100%; + left: auto; +} + +.nav-float-right .main-navigation ul ul ul { + top: 0; +} + +.menu-item-has-children .dropdown-menu-toggle { + display: inline-block; + height: 100%; + clear: both; + padding-right: 20px; + padding-left: 10px; +} + +.menu-item-has-children ul .dropdown-menu-toggle { + padding-top: 10px; + padding-bottom: 10px; + margin-top: -10px; +} + +nav ul ul .menu-item-has-children .dropdown-menu-toggle, +.sidebar .menu-item-has-children .dropdown-menu-toggle { + float: right; +} + +/*-------------------------------------------------------------- +## Sidebar Navigation +--------------------------------------------------------------*/ +.widget-area .main-navigation li { + float: none; + display: block; + width: 100%; + padding: 0; + margin: 0; +} + +.sidebar .main-navigation.sub-menu-right ul li:hover ul, +.sidebar .main-navigation.sub-menu-right ul li.sfHover ul { + top: 0; + left: 100%; +} + +.sidebar .main-navigation.sub-menu-left ul li:hover ul, +.sidebar .main-navigation.sub-menu-left ul li.sfHover ul { + top: 0; + right: 100%; +} + +/*-------------------------------------------------------------- +# Post Navigation +--------------------------------------------------------------*/ +.site-main .comment-navigation, +.site-main .posts-navigation, +.site-main .post-navigation { + margin: 0 0 2em; + overflow: hidden; +} + +.site-main .post-navigation { + margin-bottom: 0; +} + +.paging-navigation .nav-previous, +.paging-navigation .nav-next { + display: none; +} + +.paging-navigation .nav-links > * { + padding: 0 5px; +} + +.paging-navigation .nav-links .current { + font-weight: bold; +} + +/* Less specific so we don't overwrite existing customizations. */ +.nav-links > *:first-child { + padding-left: 0; +} + +/*-------------------------------------------------------------- +# Header +--------------------------------------------------------------*/ +.site-header { + position: relative; +} + +.inside-header { + padding: 20px 40px; +} + +.main-title { + margin: 0; + font-size: 25px; + line-height: 1.2em; + word-wrap: break-word; + font-weight: bold; + text-transform: none; +} + +.site-description { + margin: 0; + line-height: 1.5; + font-weight: normal; + text-transform: none; + font-size: 15px; +} + +.site-logo { + display: inline-block; + max-width: 100%; +} + +.site-header .header-image { + vertical-align: middle; +} + +.header-widget { + float: right; + overflow: hidden; + max-width: 50%; +} + +.header-widget .widget { + padding: 0 0 20px; + margin-bottom: 0; +} + +.header-widget .widget:last-child { + padding-bottom: 0; +} + +.header-widget .widget-title { + margin-bottom: 15px; +} + +.nav-float-right .header-widget { + position: relative; + top: -10px; +} + +.nav-float-right .header-widget .widget { + padding: 0 0 10px; +} + +.nav-float-left .inside-header .site-branding, +.nav-float-left .inside-header .site-logo { + float: right; + clear: right; +} + +.nav-float-left .inside-header:after { + clear: both; + content: ''; + display: table; +} + +.nav-float-right .inside-header .site-branding { + display: inline-block; +} + +.site-branding-container { + display: inline-flex; + align-items: center; + text-align: left; +} + +.site-branding-container .site-logo { + margin-right: 1.5em; +} + +.header-aligned-center .site-header { + text-align: center; +} + +.header-aligned-right .site-header { + text-align: right; +} + +.header-aligned-right .site-branding-container { + text-align: right; +} + +.header-aligned-right .site-branding-container .site-logo { + order: 10; + margin-right: 0; + margin-left: 1.5em; +} + +/*-------------------------------------------------------------- +# Post Content +--------------------------------------------------------------*/ +.sticky { + display: block; +} + +.posted-on .updated, +.entry-header .gp-icon { + display: none; +} + +.byline, +.single .byline, +.group-blog .byline, +.entry-header .cat-links, +.entry-header .tags-links, +.entry-header .comments-link { + display: inline; +} + +footer.entry-meta .byline, +footer.entry-meta .posted-on { + display: block; +} + +.page-content:not(:first-child), +.entry-content:not(:first-child), +.entry-summary:not(:first-child) { + margin-top: 2em; +} + +.page-links { + clear: both; + margin: 0 0 1.5em; +} + +.blog .format-status .entry-title, +.archive .format-status .entry-title, +.blog .format-aside .entry-header, +.archive .format-aside .entry-header, +.blog .format-status .entry-header, +.archive .format-status .entry-header, +.blog .format-status .entry-meta, +.archive .format-status .entry-meta { + display: none; +} + +.blog .format-aside .entry-content, +.archive .format-aside .entry-content, +.blog .format-status .entry-content, +.archive .format-status .entry-content { + margin-top: 0; +} + +.blog .format-status .entry-content p:last-child, +.archive .format-status .entry-content p:last-child { + margin-bottom: 0; +} + +.site-content, +.entry-header { + word-wrap: break-word; +} + +.entry-title { + margin-bottom: 0; +} + +.author .page-header .page-title { + display: flex; + align-items: center; +} + +.author .page-header .avatar { + margin-right: 20px; +} + +.page-header > *:last-child, +.page-header .author-info > *:last-child { + margin-bottom: 0; +} + +.entry-meta { + font-size: 85%; + margin-top: .5em; + line-height: 1.5; +} + +footer.entry-meta { + margin-top: 2em; +} + +.cat-links, +.tags-links, +.comments-link { + display: block; +} + +.taxonomy-description p:last-child, +.read-more-container, +.page-content > p:last-child, +.entry-content > p:last-child, +.entry-summary > p:last-child { + margin-bottom: 0; +} + +/*-------------------------------------------------------------- +# Media +--------------------------------------------------------------*/ +/*-------------------------------------------------------------- +## Captions +--------------------------------------------------------------*/ +.wp-caption { + margin-bottom: 1.5em; + max-width: 100%; + position: relative; +} + +.wp-caption img[class*="wp-image-"] { + display: block; + margin: 0 auto 0; + max-width: 100%; +} + +.wp-caption .wp-caption-text { + font-size: 75%; + padding-top: 5px; + opacity: 0.8; +} + +.wp-caption img { + position: relative; + vertical-align: bottom; +} + +.wp-block-image figcaption { + font-size: 13px; + text-align: center; +} + +/*-------------------------------------------------------------- +## Galleries +--------------------------------------------------------------*/ +.wp-block-gallery, +ul.blocks-gallery-grid { + margin-left: 0; +} + +.wp-block-gallery .blocks-gallery-image figcaption, +.wp-block-gallery .blocks-gallery-item figcaption { + background: rgba(255, 255, 255, 0.7); + color: #000; + padding: 10px; + box-sizing: border-box; +} + +.gallery { + margin-bottom: 1.5em; +} + +.gallery-item { + display: inline-block; + text-align: center; + vertical-align: top; + width: 100%; +} + +.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; +} + +.site-main .gallery { + margin-bottom: 1.5em; +} + +.gallery-item img { + vertical-align: bottom; +} + +.gallery-icon { + padding: 5px; +} + +embed, +iframe, +object { + max-width: 100%; +} + +/*-------------------------------------------------------------- +# Comments +--------------------------------------------------------------*/ +.comment-content a { + word-wrap: break-word; +} + +.bypostauthor { + display: block; +} + +.comment, +.comment-list { + list-style-type: none; + padding: 0; + margin: 0; +} + +.comment-author-info { + display: inline-block; + vertical-align: middle; +} + +.comment-meta .avatar { + float: left; + margin-right: 10px; + border-radius: 50%; +} + +.comment-author cite { + font-style: normal; + font-weight: bold; +} + +.entry-meta.comment-metadata { + margin-top: 0; +} + +.comment-content { + margin-top: 1.5em; +} + +.comment-respond { + margin-top: 0; +} + +.comment-form > .form-submit { + margin-bottom: 0; +} + +.comment-form input, +.comment-form-comment { + margin-bottom: 10px; +} + +.comment-form #author, +.comment-form #email, +.comment-form #url { + display: block; +} + +.comment-metadata .edit-link:before { + display: none; +} + +.comment-body { + padding: 30px 0; +} + +.comment-content { + padding: 30px; + border: 1px solid rgba(0, 0, 0, 0.05); +} + +.depth-1.parent > .children { + border-bottom: 1px solid rgba(0, 0, 0, 0.05); +} + +.comment .children { + padding-left: 30px; + margin-top: -30px; + border-left: 1px solid rgba(0, 0, 0, 0.05); +} + +.pingback .comment-body, +.trackback .comment-body { + border-bottom: 1px solid rgba(0, 0, 0, 0.05); +} + +.pingback .edit-link { + font-size: 13px; +} + +.comment-content p:last-child { + margin-bottom: 0; +} + +.comment-list > .comment:first-child { + padding-top: 0; + margin-top: 0; + border-top: 0; +} + +ol.comment-list { + margin-bottom: 1.5em; +} + +.comment-form-cookies-consent { + display: flex; + align-items: center; +} + +.comment-form-cookies-consent input { + margin-right: 0.5em; + margin-bottom: 0; +} + +.one-container .comments-area { + margin-top: 1.5em; +} + +.comment-content .reply { + font-size: 85%; +} + +#cancel-comment-reply-link { + padding-left: 10px; +} + +/*-------------------------------------------------------------- +# Widgets +--------------------------------------------------------------*/ +.widget-area .widget { + padding: 40px; +} + +.widget select { + max-width: 100%; +} + +.sidebar .widget *:last-child, +.footer-widgets .widget *:last-child { + margin-bottom: 0; +} + +.widget-title { + margin-bottom: 30px; + font-size: 20px; + line-height: 1.5; + font-weight: normal; + text-transform: none; +} + +.widget ul, +.widget ol { + margin: 0; +} + +.widget .search-field { + width: 100%; +} + +.widget_search .search-submit { + display: none; +} + +.widget { + margin: 0 0 30px; + box-sizing: border-box; +} + +.widget:last-child, +.separate-containers .widget:last-child { + margin-bottom: 0; +} + +.sidebar .widget, +.footer-widgets .widget { + font-size: 17px; +} + +.widget ul li { + list-style-type: none; + position: relative; + padding-bottom: 5px; +} + +.widget_categories .children { + margin-left: 1.5em; + padding-top: 5px; +} + +.widget_categories .children li:last-child { + padding-bottom: 0; +} + +.widget_nav_menu ul ul, +.widget_pages ul ul { + margin-left: 1em; + margin-top: 5px; +} + +.widget ul li.menu-item-has-children, +.widget ul li.page_item_has_children { + padding-bottom: 0; +} + +#wp-calendar { + table-layout: fixed; + font-size: 80%; +} + +#wp-calendar #prev, +#wp-calendar #prev + .pad { + border-right: 0; +} + +.sidebar .grid-container { + max-width: 100%; + width: 100%; +} + +/*-------------------------------------------------------------- +# Content Layout +--------------------------------------------------------------*/ +.post { + margin: 0 0 2em; +} + +.page-header { + margin-bottom: 30px; +} + +/*-------------------------------------------------------------- +## One Container +--------------------------------------------------------------*/ +.one-container.both-left .inside-left-sidebar, +.one-container.both-right .inside-left-sidebar { + margin-right: 20px; +} + +.one-container.both-left .inside-right-sidebar, +.one-container.both-right .inside-right-sidebar { + margin-left: 20px; +} + +.one-container:not(.page) .inside-article { + padding: 0 0 30px 0; +} + +.one-container.right-sidebar .site-main, +.one-container.both-right .site-main { + margin-right: 40px; +} + +.one-container.left-sidebar .site-main, +.one-container.both-left .site-main { + margin-left: 40px; +} + +.one-container.both-sidebars .site-main { + margin: 0px 40px 0px 40px; +} + +.one-container .site-content { + padding: 40px; +} + +/*-------------------------------------------------------------- +## Separate Containers +--------------------------------------------------------------*/ +.separate-containers .inside-article, +.separate-containers .comments-area, +.separate-containers .page-header, +.separate-containers .paging-navigation { + padding: 40px; +} + +.separate-containers .widget, +.separate-containers .site-main > *, +.separate-containers .page-header { + margin-bottom: 20px; +} + +.separate-containers .site-main { + margin: 20px; +} + +.separate-containers.no-sidebar .site-main { + margin-left: 0; + margin-right: 0; +} + +.separate-containers.right-sidebar .site-main, +.separate-containers.both-right .site-main { + margin-left: 0; +} + +.separate-containers.left-sidebar .site-main, +.separate-containers.both-left .site-main { + margin-right: 0; +} + +.separate-containers.both-right .inside-left-sidebar, +.separate-containers.both-left .inside-left-sidebar { + margin-right: 10px; +} + +.separate-containers.both-right .inside-right-sidebar, +.separate-containers.both-left .inside-right-sidebar { + margin-left: 10px; +} + +.separate-containers .inside-right-sidebar, +.separate-containers .inside-left-sidebar { + margin-top: 20px; + margin-bottom: 20px; +} + +.inside-page-header { + padding: 40px; +} + +.widget-area .main-navigation { + margin-bottom: 20px; +} + +.separate-containers .site-main > *:last-child, +.one-container .site-main > *:last-child { + margin-bottom: 0; +} + +/*-------------------------------------------------------------- +## Full Width Content +--------------------------------------------------------------*/ +.full-width-content .container.grid-container { + max-width: 100%; +} + +.full-width-content.no-sidebar.separate-containers .site-main { + margin: 0; +} + +.full-width-content.separate-containers .inside-article, +.full-width-content.one-container .site-content { + padding: 0; +} + +.full-width-content .entry-content .alignwide { + margin-left: 0; + width: auto; + max-width: unset; +} + +/*-------------------------------------------------------------- +## Contained Content +--------------------------------------------------------------*/ +.contained-content.separate-containers .inside-article, +.contained-content.one-container .site-content { + padding: 0; +} + +/*-------------------------------------------------------------- +# Footer +--------------------------------------------------------------*/ +.site-info { + text-align: center; + font-size: 15px; +} + +.site-info { + padding: 20px 40px; +} + +.footer-widgets { + padding: 40px; +} + +.site-footer .footer-widgets-container .inner-padding { + padding: 0px 0px 0px 40px; +} + +.site-footer .footer-widgets-container .inside-footer-widgets { + margin-left: -40px; +} + +/*-------------------------------------------------------------- +## Footer Bar +--------------------------------------------------------------*/ +.footer-bar-active .footer-bar .widget { + padding: 0; +} + +.footer-bar .widget_nav_menu > div > ul { + display: inline-block; + vertical-align: top; +} + +.footer-bar .widget_nav_menu li { + margin: 0 10px; + float: left; + padding: 0; +} + +.footer-bar .widget_nav_menu li:first-child { + margin-left: 0; +} + +.footer-bar .widget_nav_menu li:last-child { + margin-right: 0; +} + +.footer-bar .widget_nav_menu li ul { + display: none; +} + +.footer-bar .textwidget p:last-child { + margin: 0; +} + +.footer-bar .widget-title { + display: none; +} + +.footer-bar-align-right .copyright-bar { + float: left; +} + +.footer-bar-align-right .footer-bar { + float: right; + text-align: right; +} + +.footer-bar-align-left .copyright-bar { + float: right; + text-align: right; +} + +.footer-bar-align-left .footer-bar { + float: left; + text-align: left; +} + +.footer-bar-align-center .copyright-bar { + float: none; + text-align: center; +} + +.footer-bar-align-center .footer-bar { + float: none; + text-align: center; + margin-bottom: 10px; +} + +/*-------------------------------------------------------------- +# Featured Images +--------------------------------------------------------------*/ +.post-image:not(:first-child) { + margin-top: 2em; +} + +.page-header-image, +.page-header-image-single { + line-height: 0; + /* no more weird spacing */ +} + +.separate-containers .inside-article > [class*="page-header-"], +.one-container .inside-article > [class*="page-header-"] { + margin-bottom: 2em; + margin-top: 0; +} + +.inside-article .page-header-image-single.page-header-below-title { + margin-top: 2em; +} + +.separate-containers .page-header-image, +.separate-containers .page-header-contained, +.separate-containers .page-header-content, +.separate-containers .page-header-image-single, +.separate-containers .page-header-content-single { + margin-top: 20px; +} + +/*-------------------------------------------------------------- +# Top Bar +--------------------------------------------------------------*/ +.top-bar { + font-weight: normal; + text-transform: none; + font-size: 13px; +} + +.top-bar .inside-top-bar .widget { + padding: 0; + display: inline-block; + margin: 0; +} + +.top-bar .inside-top-bar .textwidget p:last-child { + margin: 0; +} + +.top-bar .widget-title { + display: none; +} + +.top-bar .widget_nav_menu li { + margin: 0 10px; + float: left; + padding: 0; +} + +.top-bar .widget_nav_menu li:first-child { + margin-left: 0; +} + +.top-bar .widget_nav_menu li:last-child { + margin-right: 0; +} + +.top-bar .widget_nav_menu li ul { + display: none; +} + +.top-bar .widget_nav_menu > div > ul { + display: inline-block; + vertical-align: top; +} + +.inside-top-bar { + padding: 10px 40px; +} + +.top-bar-align-center { + text-align: center; +} + +.top-bar-align-center .inside-top-bar .widget:not(:first-child) { + margin-left: 10px; +} + +.top-bar-align-center .inside-top-bar .widget:first-child:last-child { + display: block; +} + +.top-bar-align-right { + text-align: right; +} + +.top-bar-align-right .inside-top-bar > .widget:nth-child(even) { + float: left; + margin-right: 10px; +} + +.top-bar-align-right .inside-top-bar > .widget:nth-child(odd) { + margin-left: 10px; +} + +.top-bar-align-left .inside-top-bar > .widget:nth-child(odd) { + float: left; + margin-right: 10px; +} + +.top-bar-align-left .inside-top-bar > .widget:nth-child(even) { + margin-left: 10px; + float: right; +} + +/*-------------------------------------------------------------- +# Icons +--------------------------------------------------------------*/ +.gp-icon { + display: inline-flex; + align-self: center; +} + +.gp-icon svg { + height: 1em; + width: 1em; + top: .125em; + position: relative; + fill: currentColor; +} + +.icon-menu-bars svg:nth-child(2), +.toggled .icon-menu-bars svg:nth-child(1), +.icon-search svg:nth-child(2), +.close-search .icon-search svg:nth-child(1) { + display: none; +} + +.toggled .icon-menu-bars svg:nth-child(2), +.close-search .icon-search svg:nth-child(2) { + display: block; +} + +.entry-meta .gp-icon { + margin-right: 0.6em; + opacity: 0.7; +} + +nav.toggled .icon-arrow-left svg { + transform: rotate(-90deg); +} + +nav.toggled .icon-arrow-right svg { + transform: rotate(90deg); +} + +nav.toggled .sfHover > a > .dropdown-menu-toggle .gp-icon svg { + transform: rotate(180deg); +} + +nav.toggled .sfHover > a > .dropdown-menu-toggle .gp-icon.icon-arrow-left svg { + transform: rotate(-270deg); +} + +nav.toggled .sfHover > a > .dropdown-menu-toggle .gp-icon.icon-arrow-right svg { + transform: rotate(270deg); +} + +/*-------------------------------------------------------------- +# Compatibility +--------------------------------------------------------------*/ +/* Bootstrap fix */ +.container.grid-container { + width: auto; +} + +/* Globally hidden elements when Infinite Scroll is supported and in use. */ +.infinite-scroll .paging-navigation, +.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; +} + +/* SiteOrigin Page Builder */ +.so-panel.widget { + padding: 0; +} + +/* MailChimp CSS */ +#mc_embed_signup .clear { + display: block; + height: auto; + visibility: visible; + width: auto; +} + +/*-------------------------------------------------------------- +# Mobile Menu +--------------------------------------------------------------*/ +.menu-toggle, +.mobile-bar-items, +.sidebar-nav-mobile { + display: none; +} + +.menu-toggle { + padding: 0 20px; + line-height: 60px; + margin: 0; + font-weight: normal; + text-transform: none; + font-size: 15px; + cursor: pointer; +} + +button.menu-toggle { + background-color: transparent; + width: 100%; + border: 0; + text-align: center; +} + +button.menu-toggle:hover, +button.menu-toggle:active, +button.menu-toggle:focus { + background-color: transparent; +} + +.menu-toggle .mobile-menu { + padding-left: 3px; +} + +.menu-toggle .gp-icon + .mobile-menu { + padding-left: 9px; +} + +.menu-toggle .mobile-menu:empty { + display: none; +} + +.nav-search-enabled .main-navigation .menu-toggle { + text-align: left; +} + +.mobile-bar-items { + display: none; + position: absolute; + right: 0; + top: 0; + z-index: 21; + list-style-type: none; +} + +.mobile-bar-items a { + display: inline-block; +} + +nav.toggled ul ul.sub-menu { + width: 100%; +} + +.dropdown-hover .main-navigation.toggled ul li:hover > ul, +.dropdown-hover .main-navigation.toggled ul li.sfHover > ul { + transition-delay: 0s; +} + +.toggled .menu-item-has-children .dropdown-menu-toggle { + padding-left: 20px; +} + +.main-navigation.toggled ul ul { + transition: 0s; + visibility: hidden; +} + +.main-navigation.toggled .main-nav > ul { + display: block; +} + +.main-navigation.toggled .main-nav ul ul.toggled-on { + position: relative; + top: 0; + left: auto !important; + right: auto !important; + width: 100%; + pointer-events: auto; + height: auto; + opacity: 1; + display: block; + visibility: visible; + float: none; +} + +.main-navigation.toggled .main-nav li { + float: none; + clear: both; + display: block; + text-align: left; +} + +.main-navigation.toggled .main-nav li.hide-on-mobile { + display: none !important; +} + +.main-navigation.toggled .menu-item-has-children .dropdown-menu-toggle { + float: right; +} + +.main-navigation.toggled .menu li.search-item { + display: none !important; +} + +.main-navigation.toggled .sf-menu > li.menu-item-float-right { + float: none; + display: inline-block; +} + +/*-------------------------------------------------------------- +# Breakpoint (768px) +--------------------------------------------------------------*/ +@media (max-width: 768px) { + /*-------------------------------------------------------------- + ## Links + --------------------------------------------------------------*/ + a, body, button, input, select, textarea { + transition: all 0s ease-in-out; + } + /*-------------------------------------------------------------- + ## Top Bar + --------------------------------------------------------------*/ + .top-bar.top-bar-align-left, + .top-bar.top-bar-align-right { + text-align: center; + } + .top-bar .widget { + float: none !important; + margin: 0 10px !important; + } + .top-bar .widget_nav_menu li { + float: none; + display: inline-block; + padding: 5px 0; + } + .footer-bar .widget_nav_menu li:first-child { + margin-left: 10px; + } + .footer-bar .widget_nav_menu li:last-child { + margin-right: 10px; + } + /*-------------------------------------------------------------- + ## Header + --------------------------------------------------------------*/ + .inside-header > *:not(:last-child):not(.main-navigation) { + margin-bottom: 20px; + } + .site-header, + .header-aligned-right .site-header { + text-align: center; + } + .header-widget { + float: none; + max-width: 100%; + text-align: center; + } + /*-------------------------------------------------------------- + ## Content Area + --------------------------------------------------------------*/ + .sidebar, + .content-area, + .inside-footer-widgets > div { + float: none; + width: 100%; + left: 0; + right: 0; + } + .site-main { + margin-left: 0 !important; + margin-right: 0 !important; + } + body:not(.no-sidebar) .site-main { + margin-bottom: 0 !important; + } + .one-container .sidebar { + margin-top: 40px; + } + .separate-containers #left-sidebar + #right-sidebar .inside-right-sidebar { + margin-top: 0; + } + .both-right.separate-containers .inside-left-sidebar, + .both-left.separate-containers .inside-left-sidebar, + .both-right.separate-containers .inside-right-sidebar, + .both-left.separate-containers .inside-right-sidebar { + margin-right: 0; + margin-left: 0; + } + .alignleft, + .alignright { + float: none; + display: block; + margin-left: auto; + margin-right: auto; + } + .post-image-aligned-left .post-image, + .post-image-aligned-right .post-image { + float: none; + margin: 2em 0; + text-align: center; + } + .comment .children { + padding-left: 10px; + margin-left: 0; + } + .edd_download { + display: block; + float: none !important; + margin-bottom: 1.5em; + width: 100% !important; + } + .entry-meta { + font-size: inherit; + } + .entry-meta a { + line-height: 1.8em; + } + /*-------------------------------------------------------------- + ## Footer + --------------------------------------------------------------*/ + .site-info { + text-align: center; + } + .copyright-bar { + float: none !important; + text-align: center !important; + } + .footer-bar { + float: none !important; + text-align: center !important; + margin-bottom: 20px; + } + .footer-bar .widget_nav_menu li { + float: none; + display: inline-block; + padding: 5px 0; + } + .inside-footer-widgets > div:not(:last-child) { + margin-bottom: 40px; + } + .site-footer .footer-widgets .footer-widgets-container .inside-footer-widgets { + margin: 0; + } + .site-footer .footer-widgets .footer-widgets-container .inner-padding { + padding: 0; + } +} diff --git a/wp-content/themes/generatepress/assets/css/all.min.css b/wp-content/themes/generatepress/assets/css/all.min.css index 3eee21a3..cab58862 100644 --- a/wp-content/themes/generatepress/assets/css/all.min.css +++ b/wp-content/themes/generatepress/assets/css/all.min.css @@ -1 +1 @@ -.clearfix:after,.clearfix:before,.grid-100:after,.grid-100:before,.grid-15:after,.grid-15:before,.grid-20:after,.grid-20:before,.grid-25:after,.grid-25:before,.grid-30:after,.grid-30:before,.grid-33:after,.grid-33:before,.grid-35:after,.grid-35:before,.grid-40:after,.grid-40:before,.grid-45:after,.grid-45:before,.grid-50:after,.grid-50:before,.grid-55:after,.grid-55:before,.grid-60:after,.grid-60:before,.grid-65:after,.grid-65:before,.grid-66:after,.grid-66:before,.grid-70:after,.grid-70:before,.grid-75:after,.grid-75:before,.grid-80:after,.grid-80:before,.grid-85:after,.grid-85:before,.grid-container:after,.grid-container:before,[class*=mobile-grid-]:after,[class*=mobile-grid-]:before,[class*=tablet-grid-]:after,[class*=tablet-grid-]:before{content:".";display:block;overflow:hidden;visibility:hidden;font-size:0;line-height:0;width:0;height:0}.clearfix:after,.grid-100:after,.grid-15:after,.grid-20:after,.grid-25:after,.grid-30:after,.grid-33:after,.grid-35:after,.grid-40:after,.grid-45:after,.grid-50:after,.grid-55:after,.grid-60:after,.grid-65:after,.grid-66:after,.grid-70:after,.grid-75:after,.grid-80:after,.grid-85:after,.grid-90:after,.grid-95:after,.grid-container:after,[class*=mobile-grid-]:after,[class*=tablet-grid-]:after{clear:both}.grid-container{margin-left:auto;margin-right:auto;max-width:1200px;padding-left:10px;padding-right:10px}.grid-100,.grid-15,.grid-20,.grid-25,.grid-30,.grid-33,.grid-35,.grid-40,.grid-45,.grid-50,.grid-55,.grid-60,.grid-65,.grid-66,.grid-70,.grid-75,.grid-80,.grid-85,.grid-90,.grid-95,[class*=mobile-grid-],[class*=tablet-grid-]{box-sizing:border-box;padding-left:10px;padding-right:10px}.grid-parent{padding-left:0;padding-right:0}@media (max-width:767px){.hide-on-mobile{display:none!important}.mobile-grid-50{float:left;width:50%}.mobile-grid-100{clear:both;width:100%}}@media (min-width:768px) and (max-width:1024px){[class*=tablet-pull-],[class*=tablet-push-]{position:relative}.hide-on-tablet{display:none!important}.tablet-grid-15{float:left;width:15%}.tablet-push-15{left:15%}.tablet-pull-15{left:-15%}.tablet-grid-20{float:left;width:20%}.tablet-push-20{left:20%}.tablet-pull-20{left:-20%}.tablet-grid-25{float:left;width:25%}.tablet-push-25{left:25%}.tablet-pull-25{left:-25%}.tablet-grid-30{float:left;width:30%}.tablet-push-30{left:30%}.tablet-pull-30{left:-30%}.tablet-grid-35{float:left;width:35%}.tablet-push-35{left:35%}.tablet-pull-35{left:-35%}.tablet-grid-40{float:left;width:40%}.tablet-push-40{left:40%}.tablet-pull-40{left:-40%}.tablet-grid-45{float:left;width:45%}.tablet-push-45{left:45%}.tablet-pull-45{left:-45%}.tablet-grid-50{float:left;width:50%}.tablet-push-50{left:50%}.tablet-pull-50{left:-50%}.tablet-grid-55{float:left;width:55%}.tablet-push-55{left:55%}.tablet-pull-55{left:-55%}.tablet-grid-60{float:left;width:60%}.tablet-push-60{left:60%}.tablet-pull-60{left:-60%}.tablet-grid-65{float:left;width:65%}.tablet-push-65{left:65%}.tablet-pull-65{left:-65%}.tablet-grid-70{float:left;width:70%}.tablet-push-70{left:70%}.tablet-pull-70{left:-70%}.tablet-grid-75{float:left;width:75%}.tablet-push-75{left:75%}.tablet-pull-75{left:-75%}.tablet-grid-80{float:left;width:80%}.tablet-push-80{left:80%}.tablet-pull-80{left:-80%}.tablet-grid-85{float:left;width:85%}.tablet-push-85{left:85%}.tablet-pull-85{left:-85%}.tablet-suffix-33{margin-right:33.33333%}.tablet-push-33{left:33.33333%}.tablet-pull-33{left:-33.33333%}.tablet-grid-66{float:left;width:66.66667%}.tablet-push-66{left:66.66667%}.tablet-pull-66{left:-66.66667%}.tablet-grid-100{clear:both;width:100%}.inside-footer-widgets>div{margin-bottom:50px}.inside-footer-widgets>div:nth-child(odd){clear:both}.active-footer-widgets-1 .footer-widget-1,.active-footer-widgets-3 .footer-widget-3,.active-footer-widgets-5 .footer-widget-5{width:100%;margin-bottom:0}.active-footer-widgets-2 .inside-footer-widgets>div,.active-footer-widgets-4 .footer-widget-3,.active-footer-widgets-4 .footer-widget-4{margin-bottom:0}}@media (min-width:1025px){.pull-15,.pull-20,.pull-25,.pull-30,.pull-33,.pull-35,.pull-40,.pull-45,.pull-50,.pull-55,.pull-60,.pull-65,.pull-66,.pull-70,.pull-75,.pull-80,.pull-85,.pull-90,.pull-95,.push-15,.push-20,.push-25,.push-30,.push-33,.push-35,.push-40,.push-45,.push-50,.push-55,.push-60,.push-65,.push-66,.push-70,.push-75,.push-80,.push-85,.push-90,.push-95{position:relative}.hide-on-desktop{display:none!important}.grid-15{float:left;width:15%}.push-15{left:15%}.pull-15{left:-15%}.grid-20{float:left;width:20%}.push-20{left:20%}.pull-20{left:-20%}.grid-25{float:left;width:25%}.push-25{left:25%}.pull-25{left:-25%}.grid-30{float:left;width:30%}.push-30{left:30%}.pull-30{left:-30%}.grid-35{float:left;width:35%}.push-35{left:35%}.pull-35{left:-35%}.grid-40{float:left;width:40%}.push-40{left:40%}.pull-40{left:-40%}.grid-45{float:left;width:45%}.push-45{left:45%}.pull-45{left:-45%}.grid-50{float:left;width:50%}.push-50{left:50%}.pull-50{left:-50%}.grid-55{float:left;width:55%}.push-55{left:55%}.pull-55{left:-55%}.grid-60{float:left;width:60%}.push-60{left:60%}.pull-60{left:-60%}.grid-65{float:left;width:65%}.push-65{left:65%}.pull-65{left:-65%}.grid-70{float:left;width:70%}.push-70{left:70%}.pull-70{left:-70%}.grid-75{float:left;width:75%}.push-75{left:75%}.pull-75{left:-75%}.grid-80{float:left;width:80%}.push-80{left:80%}.pull-80{left:-80%}.grid-85{float:left;width:85%}.push-85{left:85%}.pull-85{left:-85%}.grid-33{float:left;width:33.33333%}.push-33{left:33.33333%}.pull-33{left:-33.33333%}.grid-66{float:left;width:66.66667%}.push-66{left:66.66667%}.pull-66{left:-66.66667%}.grid-100{clear:both;width:100%}}a,abbr,acronym,address,applet,big,blockquote,body,caption,cite,code,dd,del,dfn,div,dl,dt,em,fieldset,font,form,h1,h2,h3,h4,h5,h6,html,iframe,ins,kbd,label,legend,li,object,ol,p,pre,q,s,samp,small,span,strike,strong,sub,sup,table,tbody,td,tfoot,th,thead,tr,tt,ul,var{border:0;margin:0;padding:0}html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}article,aside,details,figcaption,figure,footer,header,main,nav,section{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}ol,ul{list-style:none}table{border-collapse:separate;border-spacing:0}caption,td,th{font-weight:400;text-align:left;padding:5px}blockquote:after,blockquote:before,q:after,q:before{content:""}a{background-color:transparent}a img{border:0}body,button,input,select,textarea{font-family:-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-weight:400;text-transform:none;font-size:17px;line-height:1.5}p{margin-bottom:1.5em}h1,h2,h3,h4,h5,h6{font-family:inherit;font-size:100%;font-style:inherit;font-weight:inherit}pre{background:rgba(0,0,0,.05);font-family:inherit;font-size:inherit;line-height:normal;margin-bottom:1.5em;padding:20px;overflow:auto;max-width:100%}blockquote{border-left:5px solid rgba(0,0,0,.05);padding:20px;font-size:1.2em;font-style:italic;margin:0 0 1.5em;position:relative}blockquote p:last-child{margin:0}table,td,th{border:1px solid rgba(0,0,0,.1)}table{border-collapse:separate;border-spacing:0;border-width:1px 0 0 1px;margin:0 0 1.5em;width:100%}td,th{padding:8px}th{border-width:0 1px 1px 0}td{border-width:0 1px 1px 0}hr{background-color:rgba(0,0,0,.1);border:0;height:1px;margin-bottom:40px;margin-top:40px}fieldset{padding:0;border:0;min-width:inherit}fieldset legend{padding:0;margin-bottom:1.5em}h1{font-size:42px;margin-bottom:20px;line-height:1.2em;font-weight:400;text-transform:none}h2{font-size:35px;margin-bottom:20px;line-height:1.2em;font-weight:400;text-transform:none}h3{font-size:29px;margin-bottom:20px;line-height:1.2em;font-weight:400;text-transform:none}h4{font-size:24px}h5{font-size:20px}h4,h5,h6{margin-bottom:20px}ol,ul{margin:0 0 1.5em 3em}ul{list-style:disc}ol{list-style:decimal}li>ol,li>ul{margin-bottom:0;margin-left:1.5em}dt{font-weight:700}dd{margin:0 1.5em 1.5em}b,strong{font-weight:700}cite,dfn,em,i{font-style:italic}address{margin:0 0 1.5em}code,kbd,tt,var{font:15px Monaco,Consolas,"Andale Mono","DejaVu Sans Mono",monospace}abbr,acronym{border-bottom:1px dotted #666;cursor:help}ins,mark{text-decoration:none}sub,sup{font-size:75%;height:0;line-height:0;position:relative;vertical-align:baseline}sup{bottom:1ex}sub{top:.5ex}small{font-size:75%}big{font-size:125%}figure{margin:0}table{margin:0 0 1.5em;width:100%}th{font-weight:700}img{height:auto;max-width:100%}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline}button,html input[type=button],input[type=reset],input[type=submit]{border:1px solid transparent;background:#55555e;cursor:pointer;-webkit-appearance:button;padding:10px 20px;color:#fff}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=search]{-webkit-appearance:textfield;box-sizing:content-box}input[type=search]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input[type=email],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=url],select,textarea{background:#fafafa;color:#666;border:1px solid #ccc;border-radius:0;padding:10px 15px;box-sizing:border-box;max-width:100%}textarea{overflow:auto;vertical-align:top;width:100%}input[type=file]{max-width:100%;box-sizing:border-box}a,button,input{transition:color .1s ease-in-out,background-color .1s ease-in-out}a,a:focus,a:hover,a:visited{text-decoration:none}.button,.wp-block-button .wp-block-button__link{padding:10px 20px;display:inline-block}.wp-block-button .wp-block-button__link{font-size:inherit;line-height:inherit}.using-mouse :focus{outline:0}.using-mouse ::-moz-focus-inner{border:0}.alignleft{float:left;margin-right:1.5em}.alignright{float:right;margin-left:1.5em}.aligncenter{clear:both;display:block;margin:0 auto}.size-auto,.size-full,.size-large,.size-medium,.size-thumbnail{max-width:100%;height:auto}.no-sidebar .entry-content .alignfull{margin-left:calc(-100vw / 2 + 100% / 2);margin-right:calc(-100vw / 2 + 100% / 2);max-width:100vw;width:auto}.screen-reader-text{border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute!important;width:1px;word-wrap:normal!important}.screen-reader-text:focus{background-color:#f1f1f1;border-radius:3px;box-shadow:0 0 2px 2px rgba(0,0,0,.6);clip:auto!important;-webkit-clip-path:none;clip-path:none;color:#21759b;display:block;font-size:.875rem;font-weight:700;height:auto;left:5px;line-height:normal;padding:15px 23px 14px;text-decoration:none;top:5px;width:auto;z-index:100000}#primary[tabindex="-1"]:focus{outline:0}.clear:after,.comment-content:after,.entry-content:after,.inside-footer-widgets:not(.grid-container):after,.inside-header:not(.grid-container):after,.inside-navigation:not(.grid-container):after,.inside-top-bar:not(.grid-container):after,.page-header-content-container:after,.paging-navigation:after,.site-content:after,.site-footer:after,.site-header:after,.site-info:after{content:"";display:table;clear:both}.main-navigation{z-index:100;padding:0;clear:both;display:block}.main-navigation a{display:block;text-decoration:none;font-weight:400;text-transform:none;font-size:15px}.main-navigation ul{list-style:none;margin:0;padding-left:0}.main-navigation .main-nav ul li a{padding-left:20px;padding-right:20px;line-height:60px}.inside-navigation{position:relative}.main-navigation li{float:left;position:relative}.sf-menu>li.menu-item-float-right{float:right!important}.nav-float-right .inside-header .main-navigation{float:right;clear:right}.nav-float-left .inside-header .main-navigation{float:left;clear:left}.nav-aligned-center .main-navigation:not(.toggled) .menu>li,.nav-aligned-right .main-navigation:not(.toggled) .menu>li{float:none;display:inline-block}.nav-aligned-center .main-navigation:not(.toggled) ul,.nav-aligned-right .main-navigation:not(.toggled) ul{letter-spacing:-.31em;font-size:1em}.nav-aligned-center .main-navigation:not(.toggled) ul li,.nav-aligned-right .main-navigation:not(.toggled) ul li{letter-spacing:normal}.nav-aligned-center .main-navigation{text-align:center}.nav-aligned-right .main-navigation{text-align:right}.main-navigation li.search-item{float:right}.main-navigation .mobile-bar-items a{padding-left:20px;padding-right:20px;line-height:60px}.main-navigation ul ul{display:block;box-shadow:1px 1px 0 rgba(0,0,0,.1);float:left;position:absolute;left:-99999px;opacity:0;z-index:99999;width:200px;text-align:left;top:auto;transition:opacity 80ms linear;transition-delay:0s;pointer-events:none;height:0;overflow:hidden}.main-navigation ul ul a{display:block}.main-navigation ul ul li{width:100%}.main-navigation .main-nav ul ul li a{line-height:normal;padding:10px 20px;font-size:14px}.main-navigation .main-nav ul li.menu-item-has-children>a{padding-right:0;position:relative}.main-navigation.sub-menu-left .sub-menu{right:0}.main-navigation:not(.toggled) ul li.sfHover>ul,.main-navigation:not(.toggled) ul li:hover>ul{left:auto;opacity:1;transition-delay:150ms;pointer-events:auto;height:auto;overflow:visible}.main-navigation:not(.toggled) ul ul li.sfHover>ul,.main-navigation:not(.toggled) ul ul li:hover>ul{left:100%;top:0}.main-navigation.sub-menu-left:not(.toggled) ul ul li.sfHover>ul,.main-navigation.sub-menu-left:not(.toggled) ul ul li:hover>ul{right:100%;left:auto}.nav-float-right .main-navigation ul ul ul{top:0}.menu-item-has-children .dropdown-menu-toggle{display:inline-block;height:100%;clear:both;padding-right:20px;padding-left:10px}.menu-item-has-children ul .dropdown-menu-toggle{padding-top:10px;padding-bottom:10px;margin-top:-10px}.sidebar .menu-item-has-children .dropdown-menu-toggle,nav ul ul .menu-item-has-children .dropdown-menu-toggle{float:right}.widget-area .main-navigation li{float:none;display:block;width:100%;padding:0;margin:0}.sidebar .main-navigation.sub-menu-right ul li.sfHover ul,.sidebar .main-navigation.sub-menu-right ul li:hover ul{top:0;left:100%}.sidebar .main-navigation.sub-menu-left ul li.sfHover ul,.sidebar .main-navigation.sub-menu-left ul li:hover ul{top:0;right:100%}.site-main .comment-navigation,.site-main .post-navigation,.site-main .posts-navigation{margin:0 0 2em;overflow:hidden}.site-main .post-navigation{margin-bottom:0}.paging-navigation .nav-next,.paging-navigation .nav-previous{display:none}.paging-navigation .nav-links>*{padding:0 5px}.paging-navigation .nav-links .current{font-weight:700}.nav-links>:first-child{padding-left:0}.site-header{position:relative}.inside-header{padding:20px 40px}.main-title{margin:0;font-size:25px;line-height:1.2em;word-wrap:break-word;font-weight:700;text-transform:none}.site-description{margin:0;line-height:1.5;font-weight:400;text-transform:none;font-size:15px}.site-logo{display:inline-block;max-width:100%}.site-header .header-image{vertical-align:middle}.header-widget{float:right;overflow:hidden;max-width:50%}.header-widget .widget{padding:0 0 20px;margin-bottom:0}.header-widget .widget:last-child{padding-bottom:0}.header-widget .widget-title{margin-bottom:15px}.nav-float-right .header-widget{position:relative;top:-10px}.nav-float-right .header-widget .widget{padding:0 0 10px}.nav-float-left .inside-header .site-branding,.nav-float-left .inside-header .site-logo{float:right;clear:right}.nav-float-left .inside-header:after{clear:both;content:'';display:table}.nav-float-right .inside-header .site-branding{display:inline-block}.site-branding-container{display:inline-flex;align-items:center;text-align:left}.site-branding-container .site-logo{margin-right:1.5em}.header-aligned-center .site-header{text-align:center}.header-aligned-right .site-header{text-align:right}.header-aligned-right .site-branding-container{text-align:right}.header-aligned-right .site-branding-container .site-logo{order:10;margin-right:0;margin-left:1.5em}.sticky{display:block}.entry-header .gp-icon,.posted-on .updated{display:none}.byline,.entry-header .cat-links,.entry-header .comments-link,.entry-header .tags-links,.group-blog .byline,.single .byline{display:inline}footer.entry-meta .byline,footer.entry-meta .posted-on{display:block}.entry-content:not(:first-child),.entry-summary:not(:first-child),.page-content:not(:first-child){margin-top:2em}.page-links{clear:both;margin:0 0 1.5em}.archive .format-aside .entry-header,.archive .format-status .entry-header,.archive .format-status .entry-meta,.archive .format-status .entry-title,.blog .format-aside .entry-header,.blog .format-status .entry-header,.blog .format-status .entry-meta,.blog .format-status .entry-title{display:none}.archive .format-aside .entry-content,.archive .format-status .entry-content,.blog .format-aside .entry-content,.blog .format-status .entry-content{margin-top:0}.archive .format-status .entry-content p:last-child,.blog .format-status .entry-content p:last-child{margin-bottom:0}.entry-header,.site-content{word-wrap:break-word}.entry-title{margin-bottom:0}.author .page-header .page-title{display:flex;align-items:center}.author .page-header .avatar{margin-right:20px}.page-header .author-info>:last-child,.page-header>:last-child{margin-bottom:0}.entry-meta{font-size:85%;margin-top:.5em;line-height:1.5}footer.entry-meta{margin-top:2em}.cat-links,.comments-link,.tags-links{display:block}.entry-content>p:last-child,.entry-summary>p:last-child,.page-content>p:last-child,.read-more-container,.taxonomy-description p:last-child{margin-bottom:0}.wp-caption{margin-bottom:1.5em;max-width:100%;position:relative}.wp-caption img[class*=wp-image-]{display:block;margin:0 auto 0;max-width:100%}.wp-caption .wp-caption-text{font-size:75%;padding-top:5px;opacity:.8}.wp-caption img{position:relative;vertical-align:bottom}.wp-block-image figcaption{font-size:13px;text-align:center}.wp-block-gallery,ul.blocks-gallery-grid{margin-left:0}.wp-block-gallery .blocks-gallery-image figcaption,.wp-block-gallery .blocks-gallery-item figcaption{background:rgba(255,255,255,.7);color:#000;padding:10px;box-sizing:border-box}.gallery{margin-bottom:1.5em}.gallery-item{display:inline-block;text-align:center;vertical-align:top;width:100%}.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}.site-main .gallery{margin-bottom:1.5em}.gallery-item img{vertical-align:bottom}.gallery-icon{padding:5px}embed,iframe,object{max-width:100%}.comment-content a{word-wrap:break-word}.bypostauthor{display:block}.comment,.comment-list{list-style-type:none;padding:0;margin:0}.comment-author-info{display:inline-block;vertical-align:middle}.comment-meta .avatar{float:left;margin-right:10px;border-radius:50%}.comment-author cite{font-style:normal;font-weight:700}.entry-meta.comment-metadata{margin-top:0}.comment-content{margin-top:1.5em}.comment-respond{margin-top:0}.comment-form>.form-submit{margin-bottom:0}.comment-form input,.comment-form-comment{margin-bottom:10px}.comment-form #author,.comment-form #email,.comment-form #url{display:block}.comment-metadata .edit-link:before{display:none}.comment-body{padding:30px 0}.comment-content{padding:30px;border:1px solid rgba(0,0,0,.05)}.depth-1.parent>.children{border-bottom:1px solid rgba(0,0,0,.05)}.comment .children{padding-left:30px;margin-top:-30px;border-left:1px solid rgba(0,0,0,.05)}.pingback .comment-body,.trackback .comment-body{border-bottom:1px solid rgba(0,0,0,.05)}.pingback .edit-link{font-size:13px}.comment-content p:last-child{margin-bottom:0}.comment-list>.comment:first-child{padding-top:0;margin-top:0;border-top:0}ol.comment-list{margin-bottom:1.5em}.comment-form-cookies-consent{display:flex;align-items:center}.comment-form-cookies-consent input{margin-right:.5em;margin-bottom:0}.one-container .comments-area{margin-top:1.5em}.comment-content .reply{font-size:85%}#cancel-comment-reply-link{padding-left:10px}.widget-area .widget{padding:40px}.widget select{max-width:100%}.footer-widgets .widget :last-child,.sidebar .widget :last-child{margin-bottom:0}.widget-title{margin-bottom:30px;font-size:20px;line-height:1.5;font-weight:400;text-transform:none}.widget ol,.widget ul{margin:0}.widget .search-field{width:100%}.widget_search .search-submit{display:none}.widget{margin:0 0 30px;box-sizing:border-box}.separate-containers .widget:last-child,.widget:last-child{margin-bottom:0}.footer-widgets .widget,.sidebar .widget{font-size:17px}.widget ul li{list-style-type:none;position:relative;padding-bottom:5px}.widget_categories .children{margin-left:1.5em;padding-top:5px}.widget_categories .children li:last-child{padding-bottom:0}.widget_nav_menu ul ul,.widget_pages ul ul{margin-left:1em;margin-top:5px}.widget ul li.menu-item-has-children,.widget ul li.page_item_has_children{padding-bottom:0}#wp-calendar{table-layout:fixed;font-size:80%}#wp-calendar #prev,#wp-calendar #prev+.pad{border-right:0}.sidebar .grid-container{max-width:100%;width:100%}.post{margin:0 0 2em}.page-header{margin-bottom:30px}.one-container.both-left .inside-left-sidebar,.one-container.both-right .inside-left-sidebar{margin-right:20px}.one-container.both-left .inside-right-sidebar,.one-container.both-right .inside-right-sidebar{margin-left:20px}.one-container:not(.page) .inside-article{padding:0 0 30px 0}.one-container.both-right .site-main,.one-container.right-sidebar .site-main{margin-right:40px}.one-container.both-left .site-main,.one-container.left-sidebar .site-main{margin-left:40px}.one-container.both-sidebars .site-main{margin:0 40px 0 40px}.one-container .site-content{padding:40px}.separate-containers .comments-area,.separate-containers .inside-article,.separate-containers .page-header,.separate-containers .paging-navigation{padding:40px}.separate-containers .page-header,.separate-containers .site-main>*,.separate-containers .widget{margin-bottom:20px}.separate-containers .site-main{margin:20px}.separate-containers.no-sidebar .site-main{margin-left:0;margin-right:0}.separate-containers.both-right .site-main,.separate-containers.right-sidebar .site-main{margin-left:0}.separate-containers.both-left .site-main,.separate-containers.left-sidebar .site-main{margin-right:0}.separate-containers.both-left .inside-left-sidebar,.separate-containers.both-right .inside-left-sidebar{margin-right:10px}.separate-containers.both-left .inside-right-sidebar,.separate-containers.both-right .inside-right-sidebar{margin-left:10px}.separate-containers .inside-left-sidebar,.separate-containers .inside-right-sidebar{margin-top:20px;margin-bottom:20px}.inside-page-header,.wp-block-group__inner-container{padding:40px}.widget-area .main-navigation{margin-bottom:20px}.one-container .site-main>:last-child,.separate-containers .site-main>:last-child{margin-bottom:0}.full-width-content .container.grid-container{max-width:100%}.full-width-content.no-sidebar.separate-containers .site-main{margin:0}.full-width-content.one-container .site-content,.full-width-content.separate-containers .inside-article{padding:0}.full-width-content .entry-content .alignwide{margin-left:0;width:auto;max-width:unset}.contained-content.one-container .site-content,.contained-content.separate-containers .inside-article{padding:0}.site-info{text-align:center;font-size:15px}.site-info{padding:20px 40px}.footer-widgets{padding:40px}.site-footer .footer-widgets-container .inner-padding{padding:0 0 0 40px}.site-footer .footer-widgets-container .inside-footer-widgets{margin-left:-40px}.footer-bar-active .footer-bar .widget{padding:0}.footer-bar .widget_nav_menu>div>ul{display:inline-block;vertical-align:top}.footer-bar .widget_nav_menu li{margin:0 10px;float:left;padding:0}.footer-bar .widget_nav_menu li:first-child{margin-left:0}.footer-bar .widget_nav_menu li:last-child{margin-right:0}.footer-bar .widget_nav_menu li ul{display:none}.footer-bar .textwidget p:last-child{margin:0}.footer-bar .widget-title{display:none}.footer-bar-align-right .copyright-bar{float:left}.footer-bar-align-right .footer-bar{float:right;text-align:right}.footer-bar-align-left .copyright-bar{float:right;text-align:right}.footer-bar-align-left .footer-bar{float:left;text-align:left}.footer-bar-align-center .copyright-bar{float:none;text-align:center}.footer-bar-align-center .footer-bar{float:none;text-align:center;margin-bottom:10px}.post-image:not(:first-child){margin-top:2em}.page-header-image,.page-header-image-single{line-height:0}.one-container .inside-article>[class*=page-header-],.separate-containers .inside-article>[class*=page-header-]{margin-bottom:2em;margin-top:0}.inside-article .page-header-image-single.page-header-below-title{margin-top:2em}.separate-containers .page-header-contained,.separate-containers .page-header-content,.separate-containers .page-header-content-single,.separate-containers .page-header-image,.separate-containers .page-header-image-single{margin-top:20px}.top-bar{font-weight:400;text-transform:none;font-size:13px}.top-bar .inside-top-bar .widget{padding:0;display:inline-block;margin:0}.top-bar .inside-top-bar .textwidget p:last-child{margin:0}.top-bar .widget-title{display:none}.top-bar .widget_nav_menu li{margin:0 10px;float:left;padding:0}.top-bar .widget_nav_menu li:first-child{margin-left:0}.top-bar .widget_nav_menu li:last-child{margin-right:0}.top-bar .widget_nav_menu li ul{display:none}.top-bar .widget_nav_menu>div>ul{display:inline-block;vertical-align:top}.inside-top-bar{padding:10px 40px}.top-bar-align-center{text-align:center}.top-bar-align-center .inside-top-bar .widget:not(:first-child){margin-left:10px}.top-bar-align-center .inside-top-bar .widget:first-child:last-child{display:block}.top-bar-align-right{text-align:right}.top-bar-align-right .inside-top-bar>.widget:nth-child(even){float:left;margin-right:10px}.top-bar-align-right .inside-top-bar>.widget:nth-child(odd){margin-left:10px}.top-bar-align-left .inside-top-bar>.widget:nth-child(odd){float:left;margin-right:10px}.top-bar-align-left .inside-top-bar>.widget:nth-child(even){margin-left:10px;float:right}.gp-icon{display:inline-flex;align-self:center}.gp-icon svg{height:1em;width:1em;top:.125em;position:relative;fill:currentColor}.close-search .icon-search svg:nth-child(1),.icon-menu-bars svg:nth-child(2),.icon-search svg:nth-child(2),.toggled .icon-menu-bars svg:nth-child(1){display:none}.close-search .icon-search svg:nth-child(2),.toggled .icon-menu-bars svg:nth-child(2){display:block}.entry-meta .gp-icon{margin-right:.6em;opacity:.7}nav.toggled .icon-arrow-left svg{transform:rotate(-90deg)}nav.toggled .icon-arrow-right svg{transform:rotate(90deg)}nav.toggled .sfHover>a>.dropdown-menu-toggle .gp-icon svg{transform:rotate(180deg)}nav.toggled .sfHover>a>.dropdown-menu-toggle .gp-icon.icon-arrow-left svg{transform:rotate(-270deg)}nav.toggled .sfHover>a>.dropdown-menu-toggle .gp-icon.icon-arrow-right svg{transform:rotate(270deg)}.container.grid-container{width:auto}.infinite-scroll .paging-navigation,.infinite-scroll.neverending .site-footer{display:none}.infinity-end.neverending .site-footer{display:block}.so-panel.widget{padding:0}#mc_embed_signup .clear{display:block;height:auto;visibility:visible;width:auto}.menu-toggle,.mobile-bar-items,.sidebar-nav-mobile{display:none}.menu-toggle{padding:0 20px;line-height:60px;margin:0;font-weight:400;text-transform:none;font-size:15px;cursor:pointer}button.menu-toggle{background-color:transparent;width:100%;border:0;text-align:center}button.menu-toggle:active,button.menu-toggle:focus,button.menu-toggle:hover{background-color:transparent}.menu-toggle .mobile-menu{padding-left:3px}.menu-toggle .gp-icon+.mobile-menu{padding-left:9px}.menu-toggle .mobile-menu:empty{display:none}.nav-search-enabled .main-navigation .menu-toggle{text-align:left}.mobile-bar-items{display:none;position:absolute;right:0;top:0;z-index:21;list-style-type:none}.mobile-bar-items a{display:inline-block}nav.toggled ul ul.sub-menu{width:100%}.dropdown-hover .main-navigation.toggled ul li.sfHover>ul,.dropdown-hover .main-navigation.toggled ul li:hover>ul{transition-delay:0s}.toggled .menu-item-has-children .dropdown-menu-toggle{padding-left:20px}.main-navigation.toggled ul ul{transition:0s;visibility:hidden}.main-navigation.toggled .main-nav>ul{display:block}.main-navigation.toggled .main-nav ul ul.toggled-on{position:relative;top:0;left:auto!important;right:auto!important;width:100%;pointer-events:auto;height:auto;opacity:1;display:block;visibility:visible;float:none}.main-navigation.toggled .main-nav li{float:none;clear:both;display:block;text-align:left}.main-navigation.toggled .main-nav li.hide-on-mobile{display:none!important}.main-navigation.toggled .menu-item-has-children .dropdown-menu-toggle{float:right}.main-navigation.toggled .menu li.search-item{display:none!important}.main-navigation.toggled .sf-menu>li.menu-item-float-right{float:none;display:inline-block}@media (max-width:768px){a,body,button,input,select,textarea{transition:all 0s ease-in-out}.top-bar.top-bar-align-left,.top-bar.top-bar-align-right{text-align:center}.top-bar .widget{float:none!important;margin:0 10px!important}.top-bar .widget_nav_menu li{float:none;display:inline-block;padding:5px 0}.footer-bar .widget_nav_menu li:first-child{margin-left:10px}.footer-bar .widget_nav_menu li:last-child{margin-right:10px}.inside-header>:not(:last-child):not(.main-navigation){margin-bottom:20px}.header-aligned-right .site-header,.site-header{text-align:center}.header-widget{float:none;max-width:100%;text-align:center}.content-area,.inside-footer-widgets>div,.sidebar{float:none;width:100%;left:0;right:0}.site-main{margin-left:0!important;margin-right:0!important}body:not(.no-sidebar) .site-main{margin-bottom:0!important}.one-container .sidebar{margin-top:40px}.separate-containers #left-sidebar+#right-sidebar .inside-right-sidebar{margin-top:0}.both-left.separate-containers .inside-left-sidebar,.both-left.separate-containers .inside-right-sidebar,.both-right.separate-containers .inside-left-sidebar,.both-right.separate-containers .inside-right-sidebar{margin-right:0;margin-left:0}.alignleft,.alignright{float:none;display:block;margin-left:auto;margin-right:auto}.post-image-aligned-left .post-image,.post-image-aligned-right .post-image{float:none;margin:2em 0;text-align:center}.comment .children{padding-left:10px;margin-left:0}.edd_download{display:block;float:none!important;margin-bottom:1.5em;width:100%!important}.entry-meta{font-size:inherit}.entry-meta a{line-height:1.8em}.site-info{text-align:center}.copyright-bar{float:none!important;text-align:center!important}.footer-bar{float:none!important;text-align:center!important;margin-bottom:20px}.footer-bar .widget_nav_menu li{float:none;display:inline-block;padding:5px 0}.inside-footer-widgets>div:not(:last-child){margin-bottom:40px}.site-footer .footer-widgets .footer-widgets-container .inside-footer-widgets{margin:0}.site-footer .footer-widgets .footer-widgets-container .inner-padding{padding:0}} \ No newline at end of file +.clearfix:after,.clearfix:before,.grid-100:after,.grid-100:before,.grid-15:after,.grid-15:before,.grid-20:after,.grid-20:before,.grid-25:after,.grid-25:before,.grid-30:after,.grid-30:before,.grid-33:after,.grid-33:before,.grid-35:after,.grid-35:before,.grid-40:after,.grid-40:before,.grid-45:after,.grid-45:before,.grid-50:after,.grid-50:before,.grid-55:after,.grid-55:before,.grid-60:after,.grid-60:before,.grid-65:after,.grid-65:before,.grid-66:after,.grid-66:before,.grid-70:after,.grid-70:before,.grid-75:after,.grid-75:before,.grid-80:after,.grid-80:before,.grid-85:after,.grid-85:before,.grid-container:after,.grid-container:before,[class*=mobile-grid-]:after,[class*=mobile-grid-]:before,[class*=tablet-grid-]:after,[class*=tablet-grid-]:before{content:".";display:block;overflow:hidden;visibility:hidden;font-size:0;line-height:0;width:0;height:0}.clearfix:after,.grid-100:after,.grid-15:after,.grid-20:after,.grid-25:after,.grid-30:after,.grid-33:after,.grid-35:after,.grid-40:after,.grid-45:after,.grid-50:after,.grid-55:after,.grid-60:after,.grid-65:after,.grid-66:after,.grid-70:after,.grid-75:after,.grid-80:after,.grid-85:after,.grid-90:after,.grid-95:after,.grid-container:after,[class*=mobile-grid-]:after,[class*=tablet-grid-]:after{clear:both}.grid-container{margin-left:auto;margin-right:auto;max-width:1200px;padding-left:10px;padding-right:10px}.grid-100,.grid-15,.grid-20,.grid-25,.grid-30,.grid-33,.grid-35,.grid-40,.grid-45,.grid-50,.grid-55,.grid-60,.grid-65,.grid-66,.grid-70,.grid-75,.grid-80,.grid-85,.grid-90,.grid-95,[class*=mobile-grid-],[class*=tablet-grid-]{box-sizing:border-box;padding-left:10px;padding-right:10px}.grid-parent{padding-left:0;padding-right:0}@media (max-width:767px){.hide-on-mobile{display:none!important}.mobile-grid-50{float:left;width:50%}.mobile-grid-100{clear:both;width:100%}}@media (min-width:768px) and (max-width:1024px){[class*=tablet-pull-],[class*=tablet-push-]{position:relative}.hide-on-tablet{display:none!important}.tablet-grid-15{float:left;width:15%}.tablet-push-15{left:15%}.tablet-pull-15{left:-15%}.tablet-grid-20{float:left;width:20%}.tablet-push-20{left:20%}.tablet-pull-20{left:-20%}.tablet-grid-25{float:left;width:25%}.tablet-push-25{left:25%}.tablet-pull-25{left:-25%}.tablet-grid-30{float:left;width:30%}.tablet-push-30{left:30%}.tablet-pull-30{left:-30%}.tablet-grid-35{float:left;width:35%}.tablet-push-35{left:35%}.tablet-pull-35{left:-35%}.tablet-grid-40{float:left;width:40%}.tablet-push-40{left:40%}.tablet-pull-40{left:-40%}.tablet-grid-45{float:left;width:45%}.tablet-push-45{left:45%}.tablet-pull-45{left:-45%}.tablet-grid-50{float:left;width:50%}.tablet-push-50{left:50%}.tablet-pull-50{left:-50%}.tablet-grid-55{float:left;width:55%}.tablet-push-55{left:55%}.tablet-pull-55{left:-55%}.tablet-grid-60{float:left;width:60%}.tablet-push-60{left:60%}.tablet-pull-60{left:-60%}.tablet-grid-65{float:left;width:65%}.tablet-push-65{left:65%}.tablet-pull-65{left:-65%}.tablet-grid-70{float:left;width:70%}.tablet-push-70{left:70%}.tablet-pull-70{left:-70%}.tablet-grid-75{float:left;width:75%}.tablet-push-75{left:75%}.tablet-pull-75{left:-75%}.tablet-grid-80{float:left;width:80%}.tablet-push-80{left:80%}.tablet-pull-80{left:-80%}.tablet-grid-85{float:left;width:85%}.tablet-push-85{left:85%}.tablet-pull-85{left:-85%}.tablet-suffix-33{margin-right:33.33333%}.tablet-push-33{left:33.33333%}.tablet-pull-33{left:-33.33333%}.tablet-grid-66{float:left;width:66.66667%}.tablet-push-66{left:66.66667%}.tablet-pull-66{left:-66.66667%}.tablet-grid-100{clear:both;width:100%}.inside-footer-widgets>div{margin-bottom:50px}.inside-footer-widgets>div:nth-child(odd){clear:both}.active-footer-widgets-1 .footer-widget-1,.active-footer-widgets-3 .footer-widget-3,.active-footer-widgets-5 .footer-widget-5{width:100%;margin-bottom:0}.active-footer-widgets-2 .inside-footer-widgets>div,.active-footer-widgets-4 .footer-widget-3,.active-footer-widgets-4 .footer-widget-4{margin-bottom:0}}@media (min-width:1025px){.pull-15,.pull-20,.pull-25,.pull-30,.pull-33,.pull-35,.pull-40,.pull-45,.pull-50,.pull-55,.pull-60,.pull-65,.pull-66,.pull-70,.pull-75,.pull-80,.pull-85,.pull-90,.pull-95,.push-15,.push-20,.push-25,.push-30,.push-33,.push-35,.push-40,.push-45,.push-50,.push-55,.push-60,.push-65,.push-66,.push-70,.push-75,.push-80,.push-85,.push-90,.push-95{position:relative}.hide-on-desktop{display:none!important}.grid-15{float:left;width:15%}.push-15{left:15%}.pull-15{left:-15%}.grid-20{float:left;width:20%}.push-20{left:20%}.pull-20{left:-20%}.grid-25{float:left;width:25%}.push-25{left:25%}.pull-25{left:-25%}.grid-30{float:left;width:30%}.push-30{left:30%}.pull-30{left:-30%}.grid-35{float:left;width:35%}.push-35{left:35%}.pull-35{left:-35%}.grid-40{float:left;width:40%}.push-40{left:40%}.pull-40{left:-40%}.grid-45{float:left;width:45%}.push-45{left:45%}.pull-45{left:-45%}.grid-50{float:left;width:50%}.push-50{left:50%}.pull-50{left:-50%}.grid-55{float:left;width:55%}.push-55{left:55%}.pull-55{left:-55%}.grid-60{float:left;width:60%}.push-60{left:60%}.pull-60{left:-60%}.grid-65{float:left;width:65%}.push-65{left:65%}.pull-65{left:-65%}.grid-70{float:left;width:70%}.push-70{left:70%}.pull-70{left:-70%}.grid-75{float:left;width:75%}.push-75{left:75%}.pull-75{left:-75%}.grid-80{float:left;width:80%}.push-80{left:80%}.pull-80{left:-80%}.grid-85{float:left;width:85%}.push-85{left:85%}.pull-85{left:-85%}.grid-33{float:left;width:33.33333%}.push-33{left:33.33333%}.pull-33{left:-33.33333%}.grid-66{float:left;width:66.66667%}.push-66{left:66.66667%}.pull-66{left:-66.66667%}.grid-100{clear:both;width:100%}}a,abbr,acronym,address,applet,big,blockquote,body,caption,cite,code,dd,del,dfn,div,dl,dt,em,fieldset,font,form,h1,h2,h3,h4,h5,h6,html,iframe,ins,kbd,label,legend,li,object,ol,p,pre,q,s,samp,small,span,strike,strong,sub,sup,table,tbody,td,tfoot,th,thead,tr,tt,ul,var{border:0;margin:0;padding:0}html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}article,aside,details,figcaption,figure,footer,header,main,nav,section{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}ol,ul{list-style:none}table{border-collapse:separate;border-spacing:0}caption,td,th{font-weight:400;text-align:left;padding:5px}blockquote:after,blockquote:before,q:after,q:before{content:""}a{background-color:transparent}a img{border:0}body,button,input,select,textarea{font-family:-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-weight:400;text-transform:none;font-size:17px;line-height:1.5}p{margin-bottom:1.5em}h1,h2,h3,h4,h5,h6{font-family:inherit;font-size:100%;font-style:inherit;font-weight:inherit}pre{background:rgba(0,0,0,.05);font-family:inherit;font-size:inherit;line-height:normal;margin-bottom:1.5em;padding:20px;overflow:auto;max-width:100%}blockquote{border-left:5px solid rgba(0,0,0,.05);padding:20px;font-size:1.2em;font-style:italic;margin:0 0 1.5em;position:relative}blockquote p:last-child{margin:0}table,td,th{border:1px solid rgba(0,0,0,.1)}table{border-collapse:separate;border-spacing:0;border-width:1px 0 0 1px;margin:0 0 1.5em;width:100%}td,th{padding:8px}th{border-width:0 1px 1px 0}td{border-width:0 1px 1px 0}hr{background-color:rgba(0,0,0,.1);border:0;height:1px;margin-bottom:40px;margin-top:40px}fieldset{padding:0;border:0;min-width:inherit}fieldset legend{padding:0;margin-bottom:1.5em}h1{font-size:42px;margin-bottom:20px;line-height:1.2em;font-weight:400;text-transform:none}h2{font-size:35px;margin-bottom:20px;line-height:1.2em;font-weight:400;text-transform:none}h3{font-size:29px;margin-bottom:20px;line-height:1.2em;font-weight:400;text-transform:none}h4{font-size:24px}h5{font-size:20px}h4,h5,h6{margin-bottom:20px}ol,ul{margin:0 0 1.5em 3em}ul{list-style:disc}ol{list-style:decimal}li>ol,li>ul{margin-bottom:0;margin-left:1.5em}dt{font-weight:700}dd{margin:0 1.5em 1.5em}b,strong{font-weight:700}cite,dfn,em,i{font-style:italic}address{margin:0 0 1.5em}code,kbd,tt,var{font:15px Monaco,Consolas,"Andale Mono","DejaVu Sans Mono",monospace}abbr,acronym{border-bottom:1px dotted #666;cursor:help}ins,mark{text-decoration:none}sub,sup{font-size:75%;height:0;line-height:0;position:relative;vertical-align:baseline}sup{bottom:1ex}sub{top:.5ex}small{font-size:75%}big{font-size:125%}figure{margin:0}table{margin:0 0 1.5em;width:100%}th{font-weight:700}img{height:auto;max-width:100%}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline}button,html input[type=button],input[type=reset],input[type=submit]{border:1px solid transparent;background:#55555e;cursor:pointer;-webkit-appearance:button;padding:10px 20px;color:#fff}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=search]{-webkit-appearance:textfield;box-sizing:content-box}input[type=search]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input[type=email],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=url],select,textarea{background:#fafafa;color:#666;border:1px solid #ccc;border-radius:0;padding:10px 15px;box-sizing:border-box;max-width:100%}textarea{overflow:auto;vertical-align:top;width:100%}input[type=file]{max-width:100%;box-sizing:border-box}a,button,input{transition:color .1s ease-in-out,background-color .1s ease-in-out}a,a:focus,a:hover,a:visited{text-decoration:none}.button,.wp-block-button .wp-block-button__link{padding:10px 20px;display:inline-block}.wp-block-button .wp-block-button__link{font-size:inherit;line-height:inherit}.using-mouse :focus{outline:0}.using-mouse ::-moz-focus-inner{border:0}.alignleft{float:left;margin-right:1.5em}.alignright{float:right;margin-left:1.5em}.aligncenter{clear:both;display:block;margin:0 auto}.size-auto,.size-full,.size-large,.size-medium,.size-thumbnail{max-width:100%;height:auto}.no-sidebar .entry-content .alignfull{margin-left:calc(-100vw / 2 + 100% / 2);margin-right:calc(-100vw / 2 + 100% / 2);max-width:100vw;width:auto}.screen-reader-text{border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute!important;width:1px;word-wrap:normal!important}.screen-reader-text:focus{background-color:#f1f1f1;border-radius:3px;box-shadow:0 0 2px 2px rgba(0,0,0,.6);clip:auto!important;-webkit-clip-path:none;clip-path:none;color:#21759b;display:block;font-size:.875rem;font-weight:700;height:auto;left:5px;line-height:normal;padding:15px 23px 14px;text-decoration:none;top:5px;width:auto;z-index:100000}#primary[tabindex="-1"]:focus{outline:0}.clear:after,.comment-content:after,.entry-content:after,.inside-footer-widgets:not(.grid-container):after,.inside-header:not(.grid-container):after,.inside-navigation:not(.grid-container):after,.inside-top-bar:not(.grid-container):after,.page-header-content-container:after,.paging-navigation:after,.site-content:after,.site-footer:after,.site-header:after,.site-info:after{content:"";display:table;clear:both}.main-navigation{z-index:100;padding:0;clear:both;display:block}.main-navigation a{display:block;text-decoration:none;font-weight:400;text-transform:none;font-size:15px}.main-navigation ul{list-style:none;margin:0;padding-left:0}.main-navigation .main-nav ul li a{padding-left:20px;padding-right:20px;line-height:60px}.inside-navigation{position:relative}.main-navigation li{float:left;position:relative}.sf-menu>li.menu-item-float-right{float:right!important}.nav-float-right .inside-header .main-navigation{float:right;clear:right}.nav-float-left .inside-header .main-navigation{float:left;clear:left}.nav-aligned-center .main-navigation:not(.toggled) .menu>li,.nav-aligned-right .main-navigation:not(.toggled) .menu>li{float:none;display:inline-block}.nav-aligned-center .main-navigation:not(.toggled) ul,.nav-aligned-right .main-navigation:not(.toggled) ul{letter-spacing:-.31em;font-size:1em}.nav-aligned-center .main-navigation:not(.toggled) ul li,.nav-aligned-right .main-navigation:not(.toggled) ul li{letter-spacing:normal}.nav-aligned-center .main-navigation{text-align:center}.nav-aligned-right .main-navigation{text-align:right}.main-navigation li.search-item{float:right}.main-navigation .mobile-bar-items a{padding-left:20px;padding-right:20px;line-height:60px}.main-navigation ul ul{display:block;box-shadow:1px 1px 0 rgba(0,0,0,.1);float:left;position:absolute;left:-99999px;opacity:0;z-index:99999;width:200px;text-align:left;top:auto;transition:opacity 80ms linear;transition-delay:0s;pointer-events:none;height:0;overflow:hidden}.main-navigation ul ul a{display:block}.main-navigation ul ul li{width:100%}.main-navigation .main-nav ul ul li a{line-height:normal;padding:10px 20px;font-size:14px}.main-navigation .main-nav ul li.menu-item-has-children>a{padding-right:0;position:relative}.main-navigation.sub-menu-left .sub-menu{right:0}.main-navigation:not(.toggled) ul li.sfHover>ul,.main-navigation:not(.toggled) ul li:hover>ul{left:auto;opacity:1;transition-delay:150ms;pointer-events:auto;height:auto;overflow:visible}.main-navigation:not(.toggled) ul ul li.sfHover>ul,.main-navigation:not(.toggled) ul ul li:hover>ul{left:100%;top:0}.main-navigation.sub-menu-left:not(.toggled) ul ul li.sfHover>ul,.main-navigation.sub-menu-left:not(.toggled) ul ul li:hover>ul{right:100%;left:auto}.nav-float-right .main-navigation ul ul ul{top:0}.menu-item-has-children .dropdown-menu-toggle{display:inline-block;height:100%;clear:both;padding-right:20px;padding-left:10px}.menu-item-has-children ul .dropdown-menu-toggle{padding-top:10px;padding-bottom:10px;margin-top:-10px}.sidebar .menu-item-has-children .dropdown-menu-toggle,nav ul ul .menu-item-has-children .dropdown-menu-toggle{float:right}.widget-area .main-navigation li{float:none;display:block;width:100%;padding:0;margin:0}.sidebar .main-navigation.sub-menu-right ul li.sfHover ul,.sidebar .main-navigation.sub-menu-right ul li:hover ul{top:0;left:100%}.sidebar .main-navigation.sub-menu-left ul li.sfHover ul,.sidebar .main-navigation.sub-menu-left ul li:hover ul{top:0;right:100%}.site-main .comment-navigation,.site-main .post-navigation,.site-main .posts-navigation{margin:0 0 2em;overflow:hidden}.site-main .post-navigation{margin-bottom:0}.paging-navigation .nav-next,.paging-navigation .nav-previous{display:none}.paging-navigation .nav-links>*{padding:0 5px}.paging-navigation .nav-links .current{font-weight:700}.nav-links>:first-child{padding-left:0}.site-header{position:relative}.inside-header{padding:20px 40px}.main-title{margin:0;font-size:25px;line-height:1.2em;word-wrap:break-word;font-weight:700;text-transform:none}.site-description{margin:0;line-height:1.5;font-weight:400;text-transform:none;font-size:15px}.site-logo{display:inline-block;max-width:100%}.site-header .header-image{vertical-align:middle}.header-widget{float:right;overflow:hidden;max-width:50%}.header-widget .widget{padding:0 0 20px;margin-bottom:0}.header-widget .widget:last-child{padding-bottom:0}.header-widget .widget-title{margin-bottom:15px}.nav-float-right .header-widget{position:relative;top:-10px}.nav-float-right .header-widget .widget{padding:0 0 10px}.nav-float-left .inside-header .site-branding,.nav-float-left .inside-header .site-logo{float:right;clear:right}.nav-float-left .inside-header:after{clear:both;content:'';display:table}.nav-float-right .inside-header .site-branding{display:inline-block}.site-branding-container{display:inline-flex;align-items:center;text-align:left}.site-branding-container .site-logo{margin-right:1.5em}.header-aligned-center .site-header{text-align:center}.header-aligned-right .site-header{text-align:right}.header-aligned-right .site-branding-container{text-align:right}.header-aligned-right .site-branding-container .site-logo{order:10;margin-right:0;margin-left:1.5em}.sticky{display:block}.entry-header .gp-icon,.posted-on .updated{display:none}.byline,.entry-header .cat-links,.entry-header .comments-link,.entry-header .tags-links,.group-blog .byline,.single .byline{display:inline}footer.entry-meta .byline,footer.entry-meta .posted-on{display:block}.entry-content:not(:first-child),.entry-summary:not(:first-child),.page-content:not(:first-child){margin-top:2em}.page-links{clear:both;margin:0 0 1.5em}.archive .format-aside .entry-header,.archive .format-status .entry-header,.archive .format-status .entry-meta,.archive .format-status .entry-title,.blog .format-aside .entry-header,.blog .format-status .entry-header,.blog .format-status .entry-meta,.blog .format-status .entry-title{display:none}.archive .format-aside .entry-content,.archive .format-status .entry-content,.blog .format-aside .entry-content,.blog .format-status .entry-content{margin-top:0}.archive .format-status .entry-content p:last-child,.blog .format-status .entry-content p:last-child{margin-bottom:0}.entry-header,.site-content{word-wrap:break-word}.entry-title{margin-bottom:0}.author .page-header .page-title{display:flex;align-items:center}.author .page-header .avatar{margin-right:20px}.page-header .author-info>:last-child,.page-header>:last-child{margin-bottom:0}.entry-meta{font-size:85%;margin-top:.5em;line-height:1.5}footer.entry-meta{margin-top:2em}.cat-links,.comments-link,.tags-links{display:block}.entry-content>p:last-child,.entry-summary>p:last-child,.page-content>p:last-child,.read-more-container,.taxonomy-description p:last-child{margin-bottom:0}.wp-caption{margin-bottom:1.5em;max-width:100%;position:relative}.wp-caption img[class*=wp-image-]{display:block;margin:0 auto 0;max-width:100%}.wp-caption .wp-caption-text{font-size:75%;padding-top:5px;opacity:.8}.wp-caption img{position:relative;vertical-align:bottom}.wp-block-image figcaption{font-size:13px;text-align:center}.wp-block-gallery,ul.blocks-gallery-grid{margin-left:0}.wp-block-gallery .blocks-gallery-image figcaption,.wp-block-gallery .blocks-gallery-item figcaption{background:rgba(255,255,255,.7);color:#000;padding:10px;box-sizing:border-box}.gallery{margin-bottom:1.5em}.gallery-item{display:inline-block;text-align:center;vertical-align:top;width:100%}.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}.site-main .gallery{margin-bottom:1.5em}.gallery-item img{vertical-align:bottom}.gallery-icon{padding:5px}embed,iframe,object{max-width:100%}.comment-content a{word-wrap:break-word}.bypostauthor{display:block}.comment,.comment-list{list-style-type:none;padding:0;margin:0}.comment-author-info{display:inline-block;vertical-align:middle}.comment-meta .avatar{float:left;margin-right:10px;border-radius:50%}.comment-author cite{font-style:normal;font-weight:700}.entry-meta.comment-metadata{margin-top:0}.comment-content{margin-top:1.5em}.comment-respond{margin-top:0}.comment-form>.form-submit{margin-bottom:0}.comment-form input,.comment-form-comment{margin-bottom:10px}.comment-form #author,.comment-form #email,.comment-form #url{display:block}.comment-metadata .edit-link:before{display:none}.comment-body{padding:30px 0}.comment-content{padding:30px;border:1px solid rgba(0,0,0,.05)}.depth-1.parent>.children{border-bottom:1px solid rgba(0,0,0,.05)}.comment .children{padding-left:30px;margin-top:-30px;border-left:1px solid rgba(0,0,0,.05)}.pingback .comment-body,.trackback .comment-body{border-bottom:1px solid rgba(0,0,0,.05)}.pingback .edit-link{font-size:13px}.comment-content p:last-child{margin-bottom:0}.comment-list>.comment:first-child{padding-top:0;margin-top:0;border-top:0}ol.comment-list{margin-bottom:1.5em}.comment-form-cookies-consent{display:flex;align-items:center}.comment-form-cookies-consent input{margin-right:.5em;margin-bottom:0}.one-container .comments-area{margin-top:1.5em}.comment-content .reply{font-size:85%}#cancel-comment-reply-link{padding-left:10px}.widget-area .widget{padding:40px}.widget select{max-width:100%}.footer-widgets .widget :last-child,.sidebar .widget :last-child{margin-bottom:0}.widget-title{margin-bottom:30px;font-size:20px;line-height:1.5;font-weight:400;text-transform:none}.widget ol,.widget ul{margin:0}.widget .search-field{width:100%}.widget_search .search-submit{display:none}.widget{margin:0 0 30px;box-sizing:border-box}.separate-containers .widget:last-child,.widget:last-child{margin-bottom:0}.footer-widgets .widget,.sidebar .widget{font-size:17px}.widget ul li{list-style-type:none;position:relative;padding-bottom:5px}.widget_categories .children{margin-left:1.5em;padding-top:5px}.widget_categories .children li:last-child{padding-bottom:0}.widget_nav_menu ul ul,.widget_pages ul ul{margin-left:1em;margin-top:5px}.widget ul li.menu-item-has-children,.widget ul li.page_item_has_children{padding-bottom:0}#wp-calendar{table-layout:fixed;font-size:80%}#wp-calendar #prev,#wp-calendar #prev+.pad{border-right:0}.sidebar .grid-container{max-width:100%;width:100%}.post{margin:0 0 2em}.page-header{margin-bottom:30px}.one-container.both-left .inside-left-sidebar,.one-container.both-right .inside-left-sidebar{margin-right:20px}.one-container.both-left .inside-right-sidebar,.one-container.both-right .inside-right-sidebar{margin-left:20px}.one-container:not(.page) .inside-article{padding:0 0 30px 0}.one-container.both-right .site-main,.one-container.right-sidebar .site-main{margin-right:40px}.one-container.both-left .site-main,.one-container.left-sidebar .site-main{margin-left:40px}.one-container.both-sidebars .site-main{margin:0 40px 0 40px}.one-container .site-content{padding:40px}.separate-containers .comments-area,.separate-containers .inside-article,.separate-containers .page-header,.separate-containers .paging-navigation{padding:40px}.separate-containers .page-header,.separate-containers .site-main>*,.separate-containers .widget{margin-bottom:20px}.separate-containers .site-main{margin:20px}.separate-containers.no-sidebar .site-main{margin-left:0;margin-right:0}.separate-containers.both-right .site-main,.separate-containers.right-sidebar .site-main{margin-left:0}.separate-containers.both-left .site-main,.separate-containers.left-sidebar .site-main{margin-right:0}.separate-containers.both-left .inside-left-sidebar,.separate-containers.both-right .inside-left-sidebar{margin-right:10px}.separate-containers.both-left .inside-right-sidebar,.separate-containers.both-right .inside-right-sidebar{margin-left:10px}.separate-containers .inside-left-sidebar,.separate-containers .inside-right-sidebar{margin-top:20px;margin-bottom:20px}.inside-page-header{padding:40px}.widget-area .main-navigation{margin-bottom:20px}.one-container .site-main>:last-child,.separate-containers .site-main>:last-child{margin-bottom:0}.full-width-content .container.grid-container{max-width:100%}.full-width-content.no-sidebar.separate-containers .site-main{margin:0}.full-width-content.one-container .site-content,.full-width-content.separate-containers .inside-article{padding:0}.full-width-content .entry-content .alignwide{margin-left:0;width:auto;max-width:unset}.contained-content.one-container .site-content,.contained-content.separate-containers .inside-article{padding:0}.site-info{text-align:center;font-size:15px}.site-info{padding:20px 40px}.footer-widgets{padding:40px}.site-footer .footer-widgets-container .inner-padding{padding:0 0 0 40px}.site-footer .footer-widgets-container .inside-footer-widgets{margin-left:-40px}.footer-bar-active .footer-bar .widget{padding:0}.footer-bar .widget_nav_menu>div>ul{display:inline-block;vertical-align:top}.footer-bar .widget_nav_menu li{margin:0 10px;float:left;padding:0}.footer-bar .widget_nav_menu li:first-child{margin-left:0}.footer-bar .widget_nav_menu li:last-child{margin-right:0}.footer-bar .widget_nav_menu li ul{display:none}.footer-bar .textwidget p:last-child{margin:0}.footer-bar .widget-title{display:none}.footer-bar-align-right .copyright-bar{float:left}.footer-bar-align-right .footer-bar{float:right;text-align:right}.footer-bar-align-left .copyright-bar{float:right;text-align:right}.footer-bar-align-left .footer-bar{float:left;text-align:left}.footer-bar-align-center .copyright-bar{float:none;text-align:center}.footer-bar-align-center .footer-bar{float:none;text-align:center;margin-bottom:10px}.post-image:not(:first-child){margin-top:2em}.page-header-image,.page-header-image-single{line-height:0}.one-container .inside-article>[class*=page-header-],.separate-containers .inside-article>[class*=page-header-]{margin-bottom:2em;margin-top:0}.inside-article .page-header-image-single.page-header-below-title{margin-top:2em}.separate-containers .page-header-contained,.separate-containers .page-header-content,.separate-containers .page-header-content-single,.separate-containers .page-header-image,.separate-containers .page-header-image-single{margin-top:20px}.top-bar{font-weight:400;text-transform:none;font-size:13px}.top-bar .inside-top-bar .widget{padding:0;display:inline-block;margin:0}.top-bar .inside-top-bar .textwidget p:last-child{margin:0}.top-bar .widget-title{display:none}.top-bar .widget_nav_menu li{margin:0 10px;float:left;padding:0}.top-bar .widget_nav_menu li:first-child{margin-left:0}.top-bar .widget_nav_menu li:last-child{margin-right:0}.top-bar .widget_nav_menu li ul{display:none}.top-bar .widget_nav_menu>div>ul{display:inline-block;vertical-align:top}.inside-top-bar{padding:10px 40px}.top-bar-align-center{text-align:center}.top-bar-align-center .inside-top-bar .widget:not(:first-child){margin-left:10px}.top-bar-align-center .inside-top-bar .widget:first-child:last-child{display:block}.top-bar-align-right{text-align:right}.top-bar-align-right .inside-top-bar>.widget:nth-child(even){float:left;margin-right:10px}.top-bar-align-right .inside-top-bar>.widget:nth-child(odd){margin-left:10px}.top-bar-align-left .inside-top-bar>.widget:nth-child(odd){float:left;margin-right:10px}.top-bar-align-left .inside-top-bar>.widget:nth-child(even){margin-left:10px;float:right}.gp-icon{display:inline-flex;align-self:center}.gp-icon svg{height:1em;width:1em;top:.125em;position:relative;fill:currentColor}.close-search .icon-search svg:nth-child(1),.icon-menu-bars svg:nth-child(2),.icon-search svg:nth-child(2),.toggled .icon-menu-bars svg:nth-child(1){display:none}.close-search .icon-search svg:nth-child(2),.toggled .icon-menu-bars svg:nth-child(2){display:block}.entry-meta .gp-icon{margin-right:.6em;opacity:.7}nav.toggled .icon-arrow-left svg{transform:rotate(-90deg)}nav.toggled .icon-arrow-right svg{transform:rotate(90deg)}nav.toggled .sfHover>a>.dropdown-menu-toggle .gp-icon svg{transform:rotate(180deg)}nav.toggled .sfHover>a>.dropdown-menu-toggle .gp-icon.icon-arrow-left svg{transform:rotate(-270deg)}nav.toggled .sfHover>a>.dropdown-menu-toggle .gp-icon.icon-arrow-right svg{transform:rotate(270deg)}.container.grid-container{width:auto}.infinite-scroll .paging-navigation,.infinite-scroll.neverending .site-footer{display:none}.infinity-end.neverending .site-footer{display:block}.so-panel.widget{padding:0}#mc_embed_signup .clear{display:block;height:auto;visibility:visible;width:auto}.menu-toggle,.mobile-bar-items,.sidebar-nav-mobile{display:none}.menu-toggle{padding:0 20px;line-height:60px;margin:0;font-weight:400;text-transform:none;font-size:15px;cursor:pointer}button.menu-toggle{background-color:transparent;width:100%;border:0;text-align:center}button.menu-toggle:active,button.menu-toggle:focus,button.menu-toggle:hover{background-color:transparent}.menu-toggle .mobile-menu{padding-left:3px}.menu-toggle .gp-icon+.mobile-menu{padding-left:9px}.menu-toggle .mobile-menu:empty{display:none}.nav-search-enabled .main-navigation .menu-toggle{text-align:left}.mobile-bar-items{display:none;position:absolute;right:0;top:0;z-index:21;list-style-type:none}.mobile-bar-items a{display:inline-block}nav.toggled ul ul.sub-menu{width:100%}.dropdown-hover .main-navigation.toggled ul li.sfHover>ul,.dropdown-hover .main-navigation.toggled ul li:hover>ul{transition-delay:0s}.toggled .menu-item-has-children .dropdown-menu-toggle{padding-left:20px}.main-navigation.toggled ul ul{transition:0s;visibility:hidden}.main-navigation.toggled .main-nav>ul{display:block}.main-navigation.toggled .main-nav ul ul.toggled-on{position:relative;top:0;left:auto!important;right:auto!important;width:100%;pointer-events:auto;height:auto;opacity:1;display:block;visibility:visible;float:none}.main-navigation.toggled .main-nav li{float:none;clear:both;display:block;text-align:left}.main-navigation.toggled .main-nav li.hide-on-mobile{display:none!important}.main-navigation.toggled .menu-item-has-children .dropdown-menu-toggle{float:right}.main-navigation.toggled .menu li.search-item{display:none!important}.main-navigation.toggled .sf-menu>li.menu-item-float-right{float:none;display:inline-block}@media (max-width:768px){a,body,button,input,select,textarea{transition:all 0s ease-in-out}.top-bar.top-bar-align-left,.top-bar.top-bar-align-right{text-align:center}.top-bar .widget{float:none!important;margin:0 10px!important}.top-bar .widget_nav_menu li{float:none;display:inline-block;padding:5px 0}.footer-bar .widget_nav_menu li:first-child{margin-left:10px}.footer-bar .widget_nav_menu li:last-child{margin-right:10px}.inside-header>:not(:last-child):not(.main-navigation){margin-bottom:20px}.header-aligned-right .site-header,.site-header{text-align:center}.header-widget{float:none;max-width:100%;text-align:center}.content-area,.inside-footer-widgets>div,.sidebar{float:none;width:100%;left:0;right:0}.site-main{margin-left:0!important;margin-right:0!important}body:not(.no-sidebar) .site-main{margin-bottom:0!important}.one-container .sidebar{margin-top:40px}.separate-containers #left-sidebar+#right-sidebar .inside-right-sidebar{margin-top:0}.both-left.separate-containers .inside-left-sidebar,.both-left.separate-containers .inside-right-sidebar,.both-right.separate-containers .inside-left-sidebar,.both-right.separate-containers .inside-right-sidebar{margin-right:0;margin-left:0}.alignleft,.alignright{float:none;display:block;margin-left:auto;margin-right:auto}.post-image-aligned-left .post-image,.post-image-aligned-right .post-image{float:none;margin:2em 0;text-align:center}.comment .children{padding-left:10px;margin-left:0}.edd_download{display:block;float:none!important;margin-bottom:1.5em;width:100%!important}.entry-meta{font-size:inherit}.entry-meta a{line-height:1.8em}.site-info{text-align:center}.copyright-bar{float:none!important;text-align:center!important}.footer-bar{float:none!important;text-align:center!important;margin-bottom:20px}.footer-bar .widget_nav_menu li{float:none;display:inline-block;padding:5px 0}.inside-footer-widgets>div:not(:last-child){margin-bottom:40px}.site-footer .footer-widgets .footer-widgets-container .inside-footer-widgets{margin:0}.site-footer .footer-widgets .footer-widgets-container .inner-padding{padding:0}} \ No newline at end of file diff --git a/wp-content/themes/generatepress/assets/css/components/comments.css b/wp-content/themes/generatepress/assets/css/components/comments.css index 9850a906..53441a71 100644 --- a/wp-content/themes/generatepress/assets/css/components/comments.css +++ b/wp-content/themes/generatepress/assets/css/components/comments.css @@ -1,125 +1,125 @@ -.comment-content a { - word-wrap: break-word; -} - -.bypostauthor { - display: block; -} - -.comment, -.comment-list { - list-style-type: none; - padding: 0; - margin: 0; -} - -.comment-author-info { - display: inline-block; - vertical-align: middle; -} - -.comment-meta .avatar { - float: left; - margin-right: 10px; - border-radius: 50%; -} - -.comment-author cite { - font-style: normal; - font-weight: bold; -} - -.entry-meta.comment-metadata { - margin-top: 0; -} - -.comment-content { - margin-top: 1.5em; -} - -.comment-respond { - margin-top: 0; -} - -.comment-form > .form-submit { - margin-bottom: 0; -} - -.comment-form input, -.comment-form-comment { - margin-bottom: 10px; -} - -.comment-form #author, -.comment-form #email, -.comment-form #url { - display: block; -} - -.comment-metadata .edit-link:before { - display: none; -} - -.comment-body { - padding: 30px 0; -} - -.comment-content { - padding: 30px; - border: 1px solid rgba(0, 0, 0, 0.05); -} - -.depth-1.parent > .children { - border-bottom: 1px solid rgba(0, 0, 0, 0.05); -} - -.comment .children { - padding-left: 30px; - margin-top: -30px; - border-left: 1px solid rgba(0, 0, 0, 0.05); -} - -.pingback .comment-body, -.trackback .comment-body { - border-bottom: 1px solid rgba(0, 0, 0, 0.05); -} - -.pingback .edit-link { - font-size: 13px; -} - -.comment-content p:last-child { - margin-bottom: 0; -} - -.comment-list > .comment:first-child { - padding-top: 0; - margin-top: 0; - border-top: 0; -} - -ol.comment-list { - margin-bottom: 1.5em; -} - -.comment-form-cookies-consent { - display: flex; - align-items: center; -} - -.comment-form-cookies-consent input { - margin-right: 0.5em; - margin-bottom: 0; -} - -.one-container .comments-area { - margin-top: 1.5em; -} - -.comment-content .reply { - font-size: 85%; -} - -#cancel-comment-reply-link { - padding-left: 10px; -} +.comment-content a { + word-wrap: break-word; +} + +.bypostauthor { + display: block; +} + +.comment, +.comment-list { + list-style-type: none; + padding: 0; + margin: 0; +} + +.comment-author-info { + display: inline-block; + vertical-align: middle; +} + +.comment-meta .avatar { + float: left; + margin-right: 10px; + border-radius: 50%; +} + +.comment-author cite { + font-style: normal; + font-weight: bold; +} + +.entry-meta.comment-metadata { + margin-top: 0; +} + +.comment-content { + margin-top: 1.5em; +} + +.comment-respond { + margin-top: 0; +} + +.comment-form > .form-submit { + margin-bottom: 0; +} + +.comment-form input, +.comment-form-comment { + margin-bottom: 10px; +} + +.comment-form #author, +.comment-form #email, +.comment-form #url { + display: block; +} + +.comment-metadata .edit-link:before { + display: none; +} + +.comment-body { + padding: 30px 0; +} + +.comment-content { + padding: 30px; + border: 1px solid rgba(0, 0, 0, 0.05); +} + +.depth-1.parent > .children { + border-bottom: 1px solid rgba(0, 0, 0, 0.05); +} + +.comment .children { + padding-left: 30px; + margin-top: -30px; + border-left: 1px solid rgba(0, 0, 0, 0.05); +} + +.pingback .comment-body, +.trackback .comment-body { + border-bottom: 1px solid rgba(0, 0, 0, 0.05); +} + +.pingback .edit-link { + font-size: 13px; +} + +.comment-content p:last-child { + margin-bottom: 0; +} + +.comment-list > .comment:first-child { + padding-top: 0; + margin-top: 0; + border-top: 0; +} + +ol.comment-list { + margin-bottom: 1.5em; +} + +.comment-form-cookies-consent { + display: flex; + align-items: center; +} + +.comment-form-cookies-consent input { + margin-right: 0.5em; + margin-bottom: 0; +} + +.one-container .comments-area { + margin-top: 1.5em; +} + +.comment-content .reply { + font-size: 85%; +} + +#cancel-comment-reply-link { + padding-left: 10px; +} diff --git a/wp-content/themes/generatepress/assets/css/components/font-icons.css b/wp-content/themes/generatepress/assets/css/components/font-icons.css index 31ecd8fe..e8e00474 100644 --- a/wp-content/themes/generatepress/assets/css/components/font-icons.css +++ b/wp-content/themes/generatepress/assets/css/components/font-icons.css @@ -1,162 +1,162 @@ -@font-face { - font-family: "GeneratePress"; - src: url("../../fonts/generatepress.eot"); - src: url("../../fonts/generatepress.eot#iefix") format("embedded-opentype"), url("../../fonts/generatepress.woff2") format("woff2"), url("../../fonts/generatepress.woff") format("woff"), url("../../fonts/generatepress.ttf") format("truetype"), url("../../fonts/generatepress.svg#GeneratePress") format("svg"); - font-weight: normal; - font-style: normal; -} - -.menu-toggle:before, -.search-item a:before, -.dropdown-menu-toggle:before, -.cat-links:before, -.tags-links:before, -.comments-link:before, -.nav-previous .prev:before, -.nav-next .next:before, -.generate-back-to-top:before { - -moz-osx-font-smoothing: grayscale; - -webkit-font-smoothing: antialiased; - font-style: normal; - font-variant: normal; - text-rendering: auto; - line-height: 1; -} - -.cat-links:before, -.tags-links:before, -.comments-link:before, -.nav-previous .prev:before, -.nav-next .next:before { - opacity: 0.7; -} - -/*-------------------------------------------------------------- -# Mobile Menu ---------------------------------------------------------------*/ -.menu-toggle:before { - content: "\f0c9"; - font-family: GeneratePress; - width: 1.28571429em; - text-align: center; - display: inline-block; -} - -.toggled .menu-toggle:before { - content: "\f00d"; -} - -.main-navigation.toggled .sfHover > a .dropdown-menu-toggle:before { - content: "\f106"; -} - -/*-------------------------------------------------------------- -# Navigation Search ---------------------------------------------------------------*/ -.search-item a:before { - content: "\f002"; - font-family: GeneratePress; - width: 1.28571429em; - text-align: center; - display: inline-block; -} - -.search-item.close-search a:before { - content: "\f00d"; -} - -.widget .search-form button:before { - content: "\f002"; - font-family: GeneratePress; -} - -/*-------------------------------------------------------------- -# Navigation Dropdowns ---------------------------------------------------------------*/ -.dropdown-menu-toggle:before { - content: "\f107"; - font-family: GeneratePress; - display: inline-block; - width: 0.8em; - text-align: left; -} - -nav:not(.toggled) ul ul .dropdown-menu-toggle:before { - text-align: right; -} - -.dropdown-hover .sub-menu-left:not(.toggled) ul ul .dropdown-menu-toggle:before { - transform: rotate(180deg); -} - -.dropdown-click .menu-item-has-children.sfHover > a .dropdown-menu-toggle:before { - content: "\f106"; -} - -.dropdown-hover nav:not(.toggled) ul ul .dropdown-menu-toggle:before { - content: "\f105"; -} - -/*-------------------------------------------------------------- -# Post Content ---------------------------------------------------------------*/ -.entry-header .cat-links:before, -.entry-header .tags-links:before, -.entry-header .comments-link:before { - display: none; -} - -.cat-links:before, -.tags-links:before, -.comments-link:before, -.nav-previous .prev:before, -.nav-next .next:before { - font-family: GeneratePress; - text-decoration: inherit; - position: relative; - margin-right: 0.6em; - width: 13px; - text-align: center; - display: inline-block; -} - -.cat-links:before { - content: "\f07b"; -} - -.tags-links:before { - content: "\f02c"; -} - -.comments-link:before { - content: "\f086"; -} - -.nav-previous .prev:before { - content: "\f104"; -} - -.nav-next .next:before { - content: "\f105"; -} - -/*-------------------------------------------------------------- -# Sidebar Navigation ---------------------------------------------------------------*/ -.dropdown-hover.both-right .inside-left-sidebar .dropdown-menu-toggle:before, -.dropdown-hover .inside-right-sidebar .dropdown-menu-toggle:before { - content: "\f104"; -} - -.dropdown-hover.both-left .inside-right-sidebar .dropdown-menu-toggle:before, -.dropdown-hover .inside-left-sidebar .dropdown-menu-toggle:before { - content: "\f105"; -} - -/*-------------------------------------------------------------- -# Back to Top Button ---------------------------------------------------------------*/ -.generate-back-to-top:before { - content: "\f106"; - font-family: GeneratePress; -} +@font-face { + font-family: "GeneratePress"; + src: url("../../fonts/generatepress.eot"); + src: url("../../fonts/generatepress.eot#iefix") format("embedded-opentype"), url("../../fonts/generatepress.woff2") format("woff2"), url("../../fonts/generatepress.woff") format("woff"), url("../../fonts/generatepress.ttf") format("truetype"), url("../../fonts/generatepress.svg#GeneratePress") format("svg"); + font-weight: normal; + font-style: normal; +} + +.menu-toggle:before, +.search-item a:before, +.dropdown-menu-toggle:before, +.cat-links:before, +.tags-links:before, +.comments-link:before, +.nav-previous .prev:before, +.nav-next .next:before, +.generate-back-to-top:before { + -moz-osx-font-smoothing: grayscale; + -webkit-font-smoothing: antialiased; + font-style: normal; + font-variant: normal; + text-rendering: auto; + line-height: 1; +} + +.cat-links:before, +.tags-links:before, +.comments-link:before, +.nav-previous .prev:before, +.nav-next .next:before { + opacity: 0.7; +} + +/*-------------------------------------------------------------- +# Mobile Menu +--------------------------------------------------------------*/ +.menu-toggle:before { + content: "\f0c9"; + font-family: GeneratePress; + width: 1.28571429em; + text-align: center; + display: inline-block; +} + +.toggled .menu-toggle:before { + content: "\f00d"; +} + +.main-navigation.toggled .sfHover > a .dropdown-menu-toggle:before { + content: "\f106"; +} + +/*-------------------------------------------------------------- +# Navigation Search +--------------------------------------------------------------*/ +.search-item a:before { + content: "\f002"; + font-family: GeneratePress; + width: 1.28571429em; + text-align: center; + display: inline-block; +} + +.search-item.close-search a:before { + content: "\f00d"; +} + +.widget .search-form button:before { + content: "\f002"; + font-family: GeneratePress; +} + +/*-------------------------------------------------------------- +# Navigation Dropdowns +--------------------------------------------------------------*/ +.dropdown-menu-toggle:before { + content: "\f107"; + font-family: GeneratePress; + display: inline-block; + width: 0.8em; + text-align: left; +} + +nav:not(.toggled) ul ul .dropdown-menu-toggle:before { + text-align: right; +} + +.dropdown-hover .sub-menu-left:not(.toggled) ul ul .dropdown-menu-toggle:before { + transform: rotate(180deg); +} + +.dropdown-click .menu-item-has-children.sfHover > a .dropdown-menu-toggle:before { + content: "\f106"; +} + +.dropdown-hover nav:not(.toggled) ul ul .dropdown-menu-toggle:before { + content: "\f105"; +} + +/*-------------------------------------------------------------- +# Post Content +--------------------------------------------------------------*/ +.entry-header .cat-links:before, +.entry-header .tags-links:before, +.entry-header .comments-link:before { + display: none; +} + +.cat-links:before, +.tags-links:before, +.comments-link:before, +.nav-previous .prev:before, +.nav-next .next:before { + font-family: GeneratePress; + text-decoration: inherit; + position: relative; + margin-right: 0.6em; + width: 13px; + text-align: center; + display: inline-block; +} + +.cat-links:before { + content: "\f07b"; +} + +.tags-links:before { + content: "\f02c"; +} + +.comments-link:before { + content: "\f086"; +} + +.nav-previous .prev:before { + content: "\f104"; +} + +.nav-next .next:before { + content: "\f105"; +} + +/*-------------------------------------------------------------- +# Sidebar Navigation +--------------------------------------------------------------*/ +.dropdown-hover.both-right .inside-left-sidebar .dropdown-menu-toggle:before, +.dropdown-hover .inside-right-sidebar .dropdown-menu-toggle:before { + content: "\f104"; +} + +.dropdown-hover.both-left .inside-right-sidebar .dropdown-menu-toggle:before, +.dropdown-hover .inside-left-sidebar .dropdown-menu-toggle:before { + content: "\f105"; +} + +/*-------------------------------------------------------------- +# Back to Top Button +--------------------------------------------------------------*/ +.generate-back-to-top:before { + content: "\f106"; + font-family: GeneratePress; +} diff --git a/wp-content/themes/generatepress/assets/css/main.css b/wp-content/themes/generatepress/assets/css/main.css index 9c1aad30..c9978ceb 100644 --- a/wp-content/themes/generatepress/assets/css/main.css +++ b/wp-content/themes/generatepress/assets/css/main.css @@ -1,1639 +1,1638 @@ -/*-------------------------------------------------------------- ->>> TABLE OF CONTENTS: ----------------------------------------------------------------- -# Reset -# Elements -# Forms -# Links -# Alignments -# Accessibility -# Navigation - # Dropdown Menus - # Sidebar Navigation -# Post Navigation -# Header -# Post Content -# Widgets -# Content Layout -# Sidebars -# Footer -# Featured Images -# Icons -# Compatibility -# Mobile ---------------------------------------------------------------*/ -/*-------------------------------------------------------------- -# Reset ---------------------------------------------------------------*/ -html, -body, -p, -ol, -ul, -li, -dl, -dt, -dd, -blockquote, -figure, -fieldset, -legend, -textarea, -pre, -iframe, -hr, -h1, -h2, -h3, -h4, -h5, -h6 { - margin: 0; - padding: 0; - border: 0; -} - -html { - font-family: sans-serif; - -webkit-text-size-adjust: 100%; - -ms-text-size-adjust: 100%; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -/** - * Render the `main` element consistently in IE. - */ -main { - display: block; -} - -/** - * Add the correct vertical alignment in Chrome, Firefox, and Opera. - */ -progress { - vertical-align: baseline; -} - -/* Inherit box-sizing to more easily change it's value on a component level. -@link http://css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice/ */ -html { - box-sizing: border-box; -} - -*, -*::before, -*::after { - box-sizing: inherit; -} - -/** - * 1. Change the font styles in all browsers. - * 2. Remove the margin in Firefox and Safari. -*/ -button, -input, -optgroup, -select, -textarea { - font-family: inherit; - font-size: 100%; - margin: 0; -} - -/** - * 1. Correct the odd appearance in Chrome and Safari. - * 2. Correct the outline style in Safari. - */ -[type="search"] { - -webkit-appearance: textfield; - outline-offset: -2px; -} - -/** - * Remove the inner padding in Chrome and Safari on macOS. - */ -[type="search"]::-webkit-search-decoration { - -webkit-appearance: none; -} - -/** - * Remove the inner border and padding in Firefox. - */ -::-moz-focus-inner { - border-style: none; - padding: 0; -} - -/** - * Restore the focus styles unset by the previous rule. - */ -:-moz-focusring { - outline: 1px dotted ButtonText; -} - -/*-------------------------------------------------------------- -# Elements ---------------------------------------------------------------*/ -body, -button, -input, -select, -textarea { - font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; - font-weight: normal; - text-transform: none; - font-size: 17px; - line-height: 1.5; -} - -p { - margin-bottom: 1.5em; -} - -h1, -h2, -h3, -h4, -h5, -h6 { - font-family: inherit; - font-size: 100%; - font-style: inherit; - font-weight: inherit; -} - -pre { - background: rgba(0, 0, 0, 0.05); - font-family: inherit; - font-size: inherit; - line-height: normal; - margin-bottom: 1.5em; - padding: 20px; - overflow: auto; - max-width: 100%; -} - -blockquote { - border-left: 5px solid rgba(0, 0, 0, 0.05); - padding: 20px; - font-size: 1.2em; - font-style: italic; - margin: 0 0 1.5em; - position: relative; -} - -blockquote p:last-child { - margin: 0; -} - -table, -th, -td { - border: 1px solid rgba(0, 0, 0, 0.1); -} - -table { - border-collapse: separate; - border-spacing: 0; - border-width: 1px 0 0 1px; - margin: 0 0 1.5em; - width: 100%; -} - -th, -td { - padding: 8px; -} - -th { - border-width: 0 1px 1px 0; -} - -td { - border-width: 0 1px 1px 0; -} - -hr { - background-color: rgba(0, 0, 0, 0.1); - border: 0; - height: 1px; - margin-bottom: 40px; - margin-top: 40px; -} - -fieldset { - padding: 0; - border: 0; - min-width: inherit; -} - -fieldset legend { - padding: 0; - margin-bottom: 1.5em; -} - -h1 { - font-size: 42px; - margin-bottom: 20px; - line-height: 1.2em; - font-weight: normal; - text-transform: none; -} - -h2 { - font-size: 35px; - margin-bottom: 20px; - line-height: 1.2em; - font-weight: normal; - text-transform: none; -} - -h3 { - font-size: 29px; - margin-bottom: 20px; - line-height: 1.2em; - font-weight: normal; - text-transform: none; -} - -h4 { - font-size: 24px; -} - -h5 { - font-size: 20px; -} - -h4, -h5, -h6 { - margin-bottom: 20px; -} - -ul, -ol { - margin: 0 0 1.5em 3em; -} - -ul { - list-style: disc; -} - -ol { - list-style: decimal; -} - -li > ul, -li > ol { - margin-bottom: 0; - margin-left: 1.5em; -} - -dt { - font-weight: bold; -} - -dd { - margin: 0 1.5em 1.5em; -} - -b, -strong { - font-weight: bold; -} - -dfn, -cite, -em, -i { - font-style: italic; -} - -address { - margin: 0 0 1.5em; -} - -code, -kbd, -tt, -var { - font: 15px Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace; -} - -abbr, -acronym { - border-bottom: 1px dotted #666; - cursor: help; -} - -mark, -ins { - text-decoration: none; -} - -sup, -sub { - font-size: 75%; - height: 0; - line-height: 0; - position: relative; - vertical-align: baseline; -} - -sup { - bottom: 1ex; -} - -sub { - top: .5ex; -} - -small { - font-size: 75%; -} - -big { - font-size: 125%; -} - -figure { - margin: 0; -} - -table { - margin: 0 0 1.5em; - width: 100%; -} - -th { - font-weight: bold; -} - -img { - height: auto; - /* Make sure images are scaled correctly. */ - max-width: 100%; - /* Adhere to container width. */ -} - -/*-------------------------------------------------------------- -# Forms ---------------------------------------------------------------*/ -button, -input[type="button"], -input[type="reset"], -input[type="submit"] { - background: #55555e; - color: #fff; - border: 1px solid transparent; - cursor: pointer; - -webkit-appearance: button; - /* Corrects inability to style clickable 'input' types in iOS */ - padding: 10px 20px; -} - -input[type="text"], -input[type="email"], -input[type="url"], -input[type="password"], -input[type="search"], -input[type="tel"], -input[type="number"], -textarea, -select { - border: 1px solid; - border-radius: 0; - padding: 10px 15px; - max-width: 100%; -} - -textarea { - width: 100%; -} - -/*-------------------------------------------------------------- -# Links ---------------------------------------------------------------*/ -a, -button, -input { - transition: color 0.1s ease-in-out, background-color 0.1s ease-in-out; -} - -a, -a:visited, -a:hover, -a:focus { - text-decoration: none; -} - -.button, -.wp-block-button .wp-block-button__link { - padding: 10px 20px; - display: inline-block; -} - -.wp-block-button .wp-block-button__link { - font-size: inherit; - line-height: inherit; -} - -.using-mouse :focus { - outline: 0; -} - -.using-mouse ::-moz-focus-inner { - border: 0; -} - -/*-------------------------------------------------------------- -# Alignments ---------------------------------------------------------------*/ -.alignleft { - float: left; - margin-right: 1.5em; -} - -.alignright { - float: right; - margin-left: 1.5em; -} - -.aligncenter { - clear: both; - display: block; - margin: 0 auto; -} - -.size-auto, -.size-full, -.size-large, -.size-medium, -.size-thumbnail { - max-width: 100%; - height: auto; -} - -.no-sidebar .entry-content .alignfull { - margin-left: calc( -100vw / 2 + 100% / 2); - margin-right: calc( -100vw / 2 + 100% / 2); - max-width: 100vw; - width: auto; -} - -/*-------------------------------------------------------------- -# Accessibility ---------------------------------------------------------------*/ -.screen-reader-text { - border: 0; - clip: rect(1px, 1px, 1px, 1px); - -webkit-clip-path: inset(50%); - clip-path: inset(50%); - height: 1px; - margin: -1px; - overflow: hidden; - padding: 0; - position: absolute !important; - width: 1px; - word-wrap: normal !important; -} - -.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; - -webkit-clip-path: none; - clip-path: none; - color: #21759b; - display: block; - font-size: 0.875rem; - font-weight: 700; - height: auto; - left: 5px; - line-height: normal; - padding: 15px 23px 14px; - text-decoration: none; - top: 5px; - width: auto; - z-index: 100000; -} - -/* Do not show the outline on the skip link target. */ -#primary[tabindex="-1"]:focus { - outline: 0; -} - -/*-------------------------------------------------------------- -# Navigation ---------------------------------------------------------------*/ -.main-navigation { - z-index: 100; - padding: 0; - clear: both; - display: block; -} - -.main-navigation a { - display: block; - text-decoration: none; - font-weight: normal; - text-transform: none; - font-size: 15px; -} - -.main-navigation ul { - list-style: none; - margin: 0; - padding-left: 0; -} - -.main-navigation .main-nav ul li a { - padding-left: 20px; - padding-right: 20px; - line-height: 60px; -} - -.inside-navigation { - position: relative; -} - -.main-navigation .inside-navigation { - display: flex; - align-items: center; - flex-wrap: wrap; - justify-content: space-between; -} - -.main-navigation .main-nav > ul { - display: flex; - flex-wrap: wrap; - align-items: center; -} - -.main-navigation li { - position: relative; -} - -.main-navigation .menu-bar-items { - display: flex; - align-items: center; - font-size: 15px; -} - -.main-navigation .menu-bar-items a { - color: inherit; -} - -.main-navigation .menu-bar-item { - position: relative; -} - -.main-navigation .menu-bar-item.search-item { - z-index: 20; -} - -.main-navigation .menu-bar-item > a { - padding-left: 20px; - padding-right: 20px; - line-height: 60px; -} - -.sidebar .main-navigation .main-nav { - flex-basis: 100%; -} - -.sidebar .main-navigation .main-nav > ul { - flex-direction: column; -} - -.sidebar .main-navigation .menu-bar-items { - margin: 0 auto; -} - -.sidebar .main-navigation .menu-bar-items .search-item { - order: 10; -} - -.nav-align-center .inside-navigation { - justify-content: center; -} - -.nav-align-center .main-nav > ul { - justify-content: center; -} - -.nav-align-right .inside-navigation { - justify-content: flex-end; -} - -/*-------------------------------------------------------------- -## Dropdown Menus ---------------------------------------------------------------*/ -.main-navigation ul ul { - display: block; - box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.1); - float: left; - position: absolute; - left: -99999px; - opacity: 0; - z-index: 99999; - width: 200px; - text-align: left; - top: auto; - transition: opacity 80ms linear; - transition-delay: 0s; - pointer-events: none; - height: 0; - overflow: hidden; -} - -.main-navigation ul ul a { - display: block; -} - -.main-navigation ul ul li { - width: 100%; -} - -.main-navigation .main-nav ul ul li a { - line-height: normal; - padding: 10px 20px; - font-size: 14px; -} - -.main-navigation .main-nav ul li.menu-item-has-children > a { - padding-right: 0; - position: relative; -} - -.main-navigation.sub-menu-left .sub-menu { - right: 0; -} - -.main-navigation:not(.toggled) ul li:hover > ul, -.main-navigation:not(.toggled) ul li.sfHover > ul { - left: auto; - opacity: 1; - transition-delay: 150ms; - pointer-events: auto; - height: auto; - overflow: visible; -} - -.main-navigation:not(.toggled) ul ul li:hover > ul, -.main-navigation:not(.toggled) ul ul li.sfHover > ul { - left: 100%; - top: 0; -} - -.main-navigation.sub-menu-left:not(.toggled) ul ul li:hover > ul, -.main-navigation.sub-menu-left:not(.toggled) ul ul li.sfHover > ul { - right: 100%; - left: auto; -} - -.nav-float-right .main-navigation ul ul ul { - top: 0; -} - -.menu-item-has-children .dropdown-menu-toggle { - display: inline-block; - height: 100%; - clear: both; - padding-right: 20px; - padding-left: 10px; -} - -.menu-item-has-children ul .dropdown-menu-toggle { - padding-top: 10px; - padding-bottom: 10px; - margin-top: -10px; -} - -nav ul ul .menu-item-has-children .dropdown-menu-toggle, -.sidebar .menu-item-has-children .dropdown-menu-toggle { - float: right; -} - -/*-------------------------------------------------------------- -## Sidebar Navigation ---------------------------------------------------------------*/ -.widget-area .main-navigation li { - float: none; - display: block; - width: 100%; - padding: 0; - margin: 0; -} - -.sidebar .main-navigation.sub-menu-right ul li:hover ul, -.sidebar .main-navigation.sub-menu-right ul li.sfHover ul { - top: 0; - left: 100%; -} - -.sidebar .main-navigation.sub-menu-left ul li:hover ul, -.sidebar .main-navigation.sub-menu-left ul li.sfHover ul { - top: 0; - right: 100%; -} - -/*-------------------------------------------------------------- -# Post Navigation ---------------------------------------------------------------*/ -.site-main .comment-navigation, -.site-main .posts-navigation, -.site-main .post-navigation { - margin: 0 0 2em; - overflow: hidden; -} - -.site-main .post-navigation { - margin-bottom: 0; -} - -.paging-navigation .nav-previous, -.paging-navigation .nav-next { - display: none; -} - -.paging-navigation .nav-links > * { - padding: 0 5px; -} - -.paging-navigation .nav-links .current { - font-weight: bold; -} - -/* Less specific so we don't overwrite existing customizations. */ -.nav-links > *:first-child { - padding-left: 0; -} - -/*-------------------------------------------------------------- -# Header ---------------------------------------------------------------*/ -.site-header { - position: relative; -} - -.inside-header { - padding: 20px 40px; -} - -.main-title { - margin: 0; - font-size: 25px; - line-height: 1.2em; - word-wrap: break-word; - font-weight: bold; - text-transform: none; -} - -.site-description { - margin: 0; - line-height: 1.5; - font-weight: normal; - text-transform: none; - font-size: 15px; -} - -.site-logo { - display: inline-block; - max-width: 100%; -} - -.site-header .header-image { - vertical-align: middle; -} - -.inside-header { - display: flex; - align-items: center; -} - -.header-widget { - margin-left: auto; -} - -.header-widget p:last-child { - margin-bottom: 0; -} - -.nav-float-right .header-widget { - margin-left: 20px; -} - -.nav-float-right #site-navigation { - margin-left: auto; -} - -.nav-float-left #site-navigation { - margin-right: auto; - order: -10; -} - -.nav-float-left .header-widget { - margin-left: 0; - margin-right: 20px; - order: -15; -} - -.header-aligned-center:not([class*="nav-float-"]) .inside-header { - justify-content: center; - flex-direction: column; - text-align: center; -} - -.header-aligned-center:not([class*="nav-float-"]) .header-widget { - margin-left: auto; - margin-right: auto; -} - -.header-aligned-center:not([class*="nav-float-"]) .inside-header > *:not(:first-child) { - margin-top: 1em; -} - -.header-aligned-right:not([class*="nav-float-"]) .inside-header { - justify-content: flex-end; -} - -.header-aligned-right:not([class*="nav-float-"]) .header-widget { - margin-right: auto; - margin-left: 0; - order: -10; -} - -.site-branding-container { - display: inline-flex; - align-items: center; - text-align: left; - flex-shrink: 0; -} - -.site-branding-container .site-logo { - margin-right: 1em; -} - -/*-------------------------------------------------------------- -# Post Content ---------------------------------------------------------------*/ -.sticky { - display: block; -} - -.posted-on .updated, -.entry-header .gp-icon { - display: none; -} - -.byline, -.single .byline, -.group-blog .byline, -.entry-header .cat-links, -.entry-header .tags-links, -.entry-header .comments-link { - display: inline; -} - -footer.entry-meta .byline, -footer.entry-meta .posted-on { - display: block; -} - -.page-content:not(:first-child), -.entry-content:not(:first-child), -.entry-summary:not(:first-child) { - margin-top: 2em; -} - -.page-links { - clear: both; - margin: 0 0 1.5em; -} - -.blog .format-status .entry-title, -.archive .format-status .entry-title, -.blog .format-aside .entry-header, -.archive .format-aside .entry-header, -.blog .format-status .entry-header, -.archive .format-status .entry-header, -.blog .format-status .entry-meta, -.archive .format-status .entry-meta { - display: none; -} - -.blog .format-aside .entry-content, -.archive .format-aside .entry-content, -.blog .format-status .entry-content, -.archive .format-status .entry-content { - margin-top: 0; -} - -.blog .format-status .entry-content p:last-child, -.archive .format-status .entry-content p:last-child { - margin-bottom: 0; -} - -.site-content, -.entry-header { - word-wrap: break-word; -} - -.entry-title { - margin-bottom: 0; -} - -.author .page-header .page-title { - display: flex; - align-items: center; -} - -.author .page-header .avatar { - margin-right: 20px; -} - -.page-header > *:last-child, -.page-header .author-info > *:last-child { - margin-bottom: 0; -} - -.entry-meta { - font-size: 85%; - margin-top: .5em; - line-height: 1.5; -} - -footer.entry-meta { - margin-top: 2em; -} - -.cat-links, -.tags-links, -.comments-link { - display: block; -} - -.taxonomy-description p:last-child, -.read-more-container, -.page-content > p:last-child, -.entry-content > p:last-child, -.entry-summary > p:last-child { - margin-bottom: 0; -} - -/*-------------------------------------------------------------- -# Media ---------------------------------------------------------------*/ -/*-------------------------------------------------------------- -## Captions ---------------------------------------------------------------*/ -.wp-caption { - margin-bottom: 1.5em; - max-width: 100%; - position: relative; -} - -.wp-caption img[class*="wp-image-"] { - display: block; - margin: 0 auto 0; - max-width: 100%; -} - -.wp-caption .wp-caption-text { - font-size: 75%; - padding-top: 5px; - opacity: 0.8; -} - -.wp-caption img { - position: relative; - vertical-align: bottom; -} - -.wp-block-image figcaption { - font-size: 13px; - text-align: center; -} - -/*-------------------------------------------------------------- -## Galleries ---------------------------------------------------------------*/ -.wp-block-gallery, -ul.blocks-gallery-grid { - margin-left: 0; -} - -.wp-block-gallery .blocks-gallery-image figcaption, -.wp-block-gallery .blocks-gallery-item figcaption { - background: rgba(255, 255, 255, 0.7); - color: #000; - padding: 10px; - box-sizing: border-box; -} - -.gallery { - margin-bottom: 1.5em; -} - -.gallery-item { - display: inline-block; - text-align: center; - vertical-align: top; - width: 100%; -} - -.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; -} - -.site-main .gallery { - margin-bottom: 1.5em; -} - -.gallery-item img { - vertical-align: bottom; -} - -.gallery-icon { - padding: 5px; -} - -embed, -iframe, -object { - max-width: 100%; -} - -/*-------------------------------------------------------------- -# Widgets ---------------------------------------------------------------*/ -.widget-area .widget { - padding: 40px; -} - -.widget select { - max-width: 100%; -} - -.sidebar .widget *:last-child, -.footer-widgets .widget *:last-child { - margin-bottom: 0; -} - -.widget-title { - margin-bottom: 30px; - font-size: 20px; - line-height: 1.5; - font-weight: normal; - text-transform: none; -} - -.widget ul, -.widget ol { - margin: 0; -} - -.widget .search-field { - width: 100%; -} - -.widget .search-form { - display: flex; -} - -.widget .search-form button.search-submit { - font-size: 15px; -} - -.footer-widgets .widget { - margin-bottom: 30px; -} - -.sidebar .widget:last-child, -.footer-widgets .widget:last-child { - margin-bottom: 0; -} - -.widget ul li { - list-style-type: none; - position: relative; - margin-bottom: 0.5em; -} - -.widget ul li ul { - margin-left: 1em; - margin-top: 0.5em; -} - -.wp-calendar-table { - table-layout: fixed; -} - -/*-------------------------------------------------------------- -# Content Layout ---------------------------------------------------------------*/ -.site-content { - display: flex; -} - -.grid-container { - margin-left: auto; - margin-right: auto; - max-width: 1200px; -} - -.sidebar .widget, -.page-header, -.site-main > * { - margin-bottom: 20px; -} - -.both-right .inside-left-sidebar, -.both-left .inside-left-sidebar { - margin-right: 10px; -} - -.both-right .inside-right-sidebar, -.both-left .inside-right-sidebar { - margin-left: 10px; -} - -/*-------------------------------------------------------------- -## One Container ---------------------------------------------------------------*/ -.one-container.right-sidebar .site-main, -.one-container.both-right .site-main { - margin-right: 40px; -} - -.one-container.left-sidebar .site-main, -.one-container.both-left .site-main { - margin-left: 40px; -} - -.one-container.both-sidebars .site-main { - margin: 0px 40px 0px 40px; -} - -.one-container.archive .post:not(:last-child), -.one-container.blog .post:not(:last-child) { - padding-bottom: 40px; -} - -.one-container .site-content { - padding: 40px; -} - -/*-------------------------------------------------------------- -## Separate Containers ---------------------------------------------------------------*/ -.separate-containers .inside-article, -.separate-containers .comments-area, -.separate-containers .page-header, -.separate-containers .paging-navigation { - padding: 40px; -} - -.separate-containers .site-main { - margin: 20px; -} - -.separate-containers.no-sidebar .site-main { - margin-left: 0; - margin-right: 0; -} - -.separate-containers.right-sidebar .site-main, -.separate-containers.both-right .site-main { - margin-left: 0; -} - -.separate-containers.left-sidebar .site-main, -.separate-containers.both-left .site-main { - margin-right: 0; -} - -.separate-containers .inside-right-sidebar, -.separate-containers .inside-left-sidebar { - margin-top: 20px; - margin-bottom: 20px; -} - -.inside-page-header, -.wp-block-group__inner-container { - padding: 40px; -} - -.widget-area .main-navigation { - margin-bottom: 20px; -} - -.separate-containers .site-main > *:last-child, -.one-container .site-main > *:last-child { - margin-bottom: 0; -} - -/*-------------------------------------------------------------- -## Full Width Content ---------------------------------------------------------------*/ -.full-width-content .container.grid-container { - max-width: 100%; -} - -.full-width-content.no-sidebar.separate-containers .site-main { - margin: 0; -} - -.full-width-content.separate-containers .inside-article, -.full-width-content.one-container .site-content { - padding: 0; -} - -.full-width-content .entry-content .alignwide { - margin-left: 0; - width: auto; - max-width: unset; -} - -/*-------------------------------------------------------------- -## Contained Content ---------------------------------------------------------------*/ -.contained-content.separate-containers .inside-article, -.contained-content.one-container .site-content { - padding: 0; -} - -/*-------------------------------------------------------------- -# Sidebars ---------------------------------------------------------------*/ -.sidebar .grid-container { - max-width: 100%; - width: 100%; -} - -.left-sidebar .sidebar, -.both-left .is-left-sidebar, -.both-sidebars .is-left-sidebar { - order: -10; -} - -.both-left .is-right-sidebar { - order: -5; -} - -.both-right .is-left-sidebar { - order: 5; -} - -.both-right .is-right-sidebar, -.both-sidebars .is-right-sidebar { - order: 10; -} - -/*-------------------------------------------------------------- -# Footer ---------------------------------------------------------------*/ -.inside-site-info { - display: flex; - align-items: center; - justify-content: center; - padding: 20px 40px; -} - -.site-info { - text-align: center; - font-size: 15px; -} - -/*-------------------------------------------------------------- -# Featured Images ---------------------------------------------------------------*/ -.post-image:not(:first-child) { - margin-top: 2em; -} - -.featured-image { - line-height: 0; - /* no more weird spacing */ -} - -.separate-containers .featured-image { - margin-top: 20px; -} - -.separate-containers .inside-article > .featured-image { - margin-top: 0; - margin-bottom: 2em; -} - -.one-container .inside-article > .featured-image { - margin-top: 0; - margin-bottom: 2em; -} - -/*-------------------------------------------------------------- -# Icons ---------------------------------------------------------------*/ -.gp-icon { - display: inline-flex; - align-self: center; -} - -.gp-icon svg { - height: 1em; - width: 1em; - top: .125em; - position: relative; - fill: currentColor; -} - -.icon-menu-bars svg:nth-child(2), -.toggled .icon-menu-bars svg:nth-child(1), -.icon-search svg:nth-child(2), -.close-search .icon-search svg:nth-child(1) { - display: none; -} - -.toggled .icon-menu-bars svg:nth-child(2), -.close-search .icon-search svg:nth-child(2) { - display: block; -} - -.entry-meta .gp-icon { - margin-right: 0.6em; - opacity: 0.7; -} - -nav.toggled .icon-arrow-left svg { - transform: rotate(-90deg); -} - -nav.toggled .icon-arrow-right svg { - transform: rotate(90deg); -} - -nav.toggled .sfHover > a > .dropdown-menu-toggle .gp-icon svg { - transform: rotate(180deg); -} - -nav.toggled .sfHover > a > .dropdown-menu-toggle .gp-icon.icon-arrow-left svg { - transform: rotate(-270deg); -} - -nav.toggled .sfHover > a > .dropdown-menu-toggle .gp-icon.icon-arrow-right svg { - transform: rotate(270deg); -} - -/*-------------------------------------------------------------- -# Compatibility ---------------------------------------------------------------*/ -/* Bootstrap fix */ -.container.grid-container { - width: auto; -} - -/*-------------------------------------------------------------- -# Mobile ---------------------------------------------------------------*/ -/*-------------------------------------------------------------- -# Mobile Menu ---------------------------------------------------------------*/ -.menu-toggle, -.mobile-bar-items, -.sidebar-nav-mobile { - display: none; -} - -.menu-toggle { - padding: 0 20px; - line-height: 60px; - margin: 0; - font-weight: normal; - text-transform: none; - font-size: 15px; - cursor: pointer; -} - -.menu-toggle .mobile-menu { - padding-left: 3px; -} - -.menu-toggle .gp-icon + .mobile-menu { - padding-left: 9px; -} - -.menu-toggle .mobile-menu:empty { - display: none; -} - -button.menu-toggle { - background-color: transparent; - flex-grow: 1; - border: 0; - text-align: center; -} - -button.menu-toggle:hover, button.menu-toggle:active, button.menu-toggle:focus { - background-color: transparent; -} - -.has-menu-bar-items button.menu-toggle { - flex-grow: 0; -} - -nav.toggled ul ul.sub-menu { - width: 100%; -} - -.toggled .menu-item-has-children .dropdown-menu-toggle { - padding-left: 20px; -} - -.main-navigation.toggled .main-nav { - flex-basis: 100%; - order: 3; -} - -.main-navigation.toggled .main-nav > ul { - display: block; -} - -.main-navigation.toggled .main-nav li { - width: 100%; - text-align: left; -} - -.main-navigation.toggled .main-nav ul ul { - transition: 0s; - visibility: hidden; -} - -.main-navigation.toggled .main-nav ul ul.toggled-on { - position: relative; - top: 0; - left: auto !important; - right: auto !important; - width: 100%; - pointer-events: auto; - height: auto; - opacity: 1; - display: block; - visibility: visible; - float: none; -} - -.main-navigation.toggled .menu-item-has-children .dropdown-menu-toggle { - float: right; -} - -.mobile-menu-control-wrapper { - display: none; - margin-left: auto; - align-items: center; -} - -.has-inline-mobile-toggle #site-navigation.toggled { - margin-top: 1.5em; -} - -.has-inline-mobile-toggle #site-navigation.has-active-search { - margin-top: 1.5em; -} - -.has-inline-mobile-toggle #site-navigation.has-active-search .nav-search-active { - position: relative; -} - -.has-inline-mobile-toggle #site-navigation.has-active-search .navigation-search input { - outline: auto; -} - -.nav-float-left .mobile-menu-control-wrapper { - order: -10; - margin-left: 0; - margin-right: auto; - flex-direction: row-reverse; -} - -/*-------------------------------------------------------------- -## Breakpoint (768px) ---------------------------------------------------------------*/ -@media (max-width: 768px) { - .hide-on-mobile { - display: none !important; - } - /*-------------------------------------------------------------- - ## Links - --------------------------------------------------------------*/ - a, body, button, input, select, textarea { - transition: all 0s ease-in-out; - } - /*-------------------------------------------------------------- - ## Header - --------------------------------------------------------------*/ - .inside-header { - flex-direction: column; - text-align: center; - } - .site-header .header-widget { - margin-top: 1.5em; - margin-left: auto; - margin-right: auto; - text-align: center; - } - /*-------------------------------------------------------------- - ## Content Area - --------------------------------------------------------------*/ - .site-content { - flex-direction: column; - } - .container .site-content .content-area { - width: auto; - } - .is-left-sidebar.sidebar, - .is-right-sidebar.sidebar { - width: auto; - order: initial; - } - .is-left-sidebar + .is-right-sidebar .inside-right-sidebar { - margin-top: 0; - } - .both-right .inside-left-sidebar, - .both-left .inside-left-sidebar, - .both-right .inside-right-sidebar, - .both-left .inside-right-sidebar { - margin-right: 0; - margin-left: 0; - } - #main { - margin-left: 0; - margin-right: 0; - } - body:not(.no-sidebar) #main { - margin-bottom: 0; - } - .alignleft, - .alignright { - float: none; - display: block; - margin-left: auto; - margin-right: auto; - } - .comment .children { - padding-left: 10px; - margin-left: 0; - } - .entry-meta { - font-size: inherit; - } - .entry-meta a { - line-height: 1.8em; - } -} - -@media (min-width: 769px) and (max-width: 1024px) { - .hide-on-tablet { - display: none !important; - } -} - -@media (min-width: 1025px) { - .hide-on-desktop { - display: none !important; - } -} +/*-------------------------------------------------------------- +>>> TABLE OF CONTENTS: +---------------------------------------------------------------- +# Reset +# Elements +# Forms +# Links +# Alignments +# Accessibility +# Navigation + # Dropdown Menus + # Sidebar Navigation +# Post Navigation +# Header +# Post Content +# Widgets +# Content Layout +# Sidebars +# Footer +# Featured Images +# Icons +# Compatibility +# Mobile +--------------------------------------------------------------*/ +/*-------------------------------------------------------------- +# Reset +--------------------------------------------------------------*/ +html, +body, +p, +ol, +ul, +li, +dl, +dt, +dd, +blockquote, +figure, +fieldset, +legend, +textarea, +pre, +iframe, +hr, +h1, +h2, +h3, +h4, +h5, +h6 { + margin: 0; + padding: 0; + border: 0; +} + +html { + font-family: sans-serif; + -webkit-text-size-adjust: 100%; + -ms-text-size-adjust: 100%; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +/** + * Render the `main` element consistently in IE. + */ +main { + display: block; +} + +/** + * Add the correct vertical alignment in Chrome, Firefox, and Opera. + */ +progress { + vertical-align: baseline; +} + +/* Inherit box-sizing to more easily change it's value on a component level. +@link http://css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice/ */ +html { + box-sizing: border-box; +} + +*, +*::before, +*::after { + box-sizing: inherit; +} + +/** + * 1. Change the font styles in all browsers. + * 2. Remove the margin in Firefox and Safari. +*/ +button, +input, +optgroup, +select, +textarea { + font-family: inherit; + font-size: 100%; + margin: 0; +} + +/** + * 1. Correct the odd appearance in Chrome and Safari. + * 2. Correct the outline style in Safari. + */ +[type="search"] { + -webkit-appearance: textfield; + outline-offset: -2px; +} + +/** + * Remove the inner padding in Chrome and Safari on macOS. + */ +[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} + +/** + * Remove the inner border and padding in Firefox. + */ +::-moz-focus-inner { + border-style: none; + padding: 0; +} + +/** + * Restore the focus styles unset by the previous rule. + */ +:-moz-focusring { + outline: 1px dotted ButtonText; +} + +/*-------------------------------------------------------------- +# Elements +--------------------------------------------------------------*/ +body, +button, +input, +select, +textarea { + font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; + font-weight: normal; + text-transform: none; + font-size: 17px; + line-height: 1.5; +} + +p { + margin-bottom: 1.5em; +} + +h1, +h2, +h3, +h4, +h5, +h6 { + font-family: inherit; + font-size: 100%; + font-style: inherit; + font-weight: inherit; +} + +pre { + background: rgba(0, 0, 0, 0.05); + font-family: inherit; + font-size: inherit; + line-height: normal; + margin-bottom: 1.5em; + padding: 20px; + overflow: auto; + max-width: 100%; +} + +blockquote { + border-left: 5px solid rgba(0, 0, 0, 0.05); + padding: 20px; + font-size: 1.2em; + font-style: italic; + margin: 0 0 1.5em; + position: relative; +} + +blockquote p:last-child { + margin: 0; +} + +table, +th, +td { + border: 1px solid rgba(0, 0, 0, 0.1); +} + +table { + border-collapse: separate; + border-spacing: 0; + border-width: 1px 0 0 1px; + margin: 0 0 1.5em; + width: 100%; +} + +th, +td { + padding: 8px; +} + +th { + border-width: 0 1px 1px 0; +} + +td { + border-width: 0 1px 1px 0; +} + +hr { + background-color: rgba(0, 0, 0, 0.1); + border: 0; + height: 1px; + margin-bottom: 40px; + margin-top: 40px; +} + +fieldset { + padding: 0; + border: 0; + min-width: inherit; +} + +fieldset legend { + padding: 0; + margin-bottom: 1.5em; +} + +h1 { + font-size: 42px; + margin-bottom: 20px; + line-height: 1.2em; + font-weight: normal; + text-transform: none; +} + +h2 { + font-size: 35px; + margin-bottom: 20px; + line-height: 1.2em; + font-weight: normal; + text-transform: none; +} + +h3 { + font-size: 29px; + margin-bottom: 20px; + line-height: 1.2em; + font-weight: normal; + text-transform: none; +} + +h4 { + font-size: 24px; +} + +h5 { + font-size: 20px; +} + +h4, +h5, +h6 { + margin-bottom: 20px; +} + +ul, +ol { + margin: 0 0 1.5em 3em; +} + +ul { + list-style: disc; +} + +ol { + list-style: decimal; +} + +li > ul, +li > ol { + margin-bottom: 0; + margin-left: 1.5em; +} + +dt { + font-weight: bold; +} + +dd { + margin: 0 1.5em 1.5em; +} + +b, +strong { + font-weight: bold; +} + +dfn, +cite, +em, +i { + font-style: italic; +} + +address { + margin: 0 0 1.5em; +} + +code, +kbd, +tt, +var { + font: 15px Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace; +} + +abbr, +acronym { + border-bottom: 1px dotted #666; + cursor: help; +} + +mark, +ins { + text-decoration: none; +} + +sup, +sub { + font-size: 75%; + height: 0; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sup { + bottom: 1ex; +} + +sub { + top: .5ex; +} + +small { + font-size: 75%; +} + +big { + font-size: 125%; +} + +figure { + margin: 0; +} + +table { + margin: 0 0 1.5em; + width: 100%; +} + +th { + font-weight: bold; +} + +img { + height: auto; + /* Make sure images are scaled correctly. */ + max-width: 100%; + /* Adhere to container width. */ +} + +/*-------------------------------------------------------------- +# Forms +--------------------------------------------------------------*/ +button, +input[type="button"], +input[type="reset"], +input[type="submit"] { + background: #55555e; + color: #fff; + border: 1px solid transparent; + cursor: pointer; + -webkit-appearance: button; + /* Corrects inability to style clickable 'input' types in iOS */ + padding: 10px 20px; +} + +input[type="text"], +input[type="email"], +input[type="url"], +input[type="password"], +input[type="search"], +input[type="tel"], +input[type="number"], +textarea, +select { + border: 1px solid; + border-radius: 0; + padding: 10px 15px; + max-width: 100%; +} + +textarea { + width: 100%; +} + +/*-------------------------------------------------------------- +# Links +--------------------------------------------------------------*/ +a, +button, +input { + transition: color 0.1s ease-in-out, background-color 0.1s ease-in-out; +} + +a, +a:visited, +a:hover, +a:focus { + text-decoration: none; +} + +.button, +.wp-block-button .wp-block-button__link { + padding: 10px 20px; + display: inline-block; +} + +.wp-block-button .wp-block-button__link { + font-size: inherit; + line-height: inherit; +} + +.using-mouse :focus { + outline: 0; +} + +.using-mouse ::-moz-focus-inner { + border: 0; +} + +/*-------------------------------------------------------------- +# Alignments +--------------------------------------------------------------*/ +.alignleft { + float: left; + margin-right: 1.5em; +} + +.alignright { + float: right; + margin-left: 1.5em; +} + +.aligncenter { + clear: both; + display: block; + margin: 0 auto; +} + +.size-auto, +.size-full, +.size-large, +.size-medium, +.size-thumbnail { + max-width: 100%; + height: auto; +} + +.no-sidebar .entry-content .alignfull { + margin-left: calc( -100vw / 2 + 100% / 2); + margin-right: calc( -100vw / 2 + 100% / 2); + max-width: 100vw; + width: auto; +} + +/*-------------------------------------------------------------- +# Accessibility +--------------------------------------------------------------*/ +.screen-reader-text { + border: 0; + clip: rect(1px, 1px, 1px, 1px); + -webkit-clip-path: inset(50%); + clip-path: inset(50%); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute !important; + width: 1px; + word-wrap: normal !important; +} + +.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; + -webkit-clip-path: none; + clip-path: none; + color: #21759b; + display: block; + font-size: 0.875rem; + font-weight: 700; + height: auto; + left: 5px; + line-height: normal; + padding: 15px 23px 14px; + text-decoration: none; + top: 5px; + width: auto; + z-index: 100000; +} + +/* Do not show the outline on the skip link target. */ +#primary[tabindex="-1"]:focus { + outline: 0; +} + +/*-------------------------------------------------------------- +# Navigation +--------------------------------------------------------------*/ +.main-navigation { + z-index: 100; + padding: 0; + clear: both; + display: block; +} + +.main-navigation a { + display: block; + text-decoration: none; + font-weight: normal; + text-transform: none; + font-size: 15px; +} + +.main-navigation ul { + list-style: none; + margin: 0; + padding-left: 0; +} + +.main-navigation .main-nav ul li a { + padding-left: 20px; + padding-right: 20px; + line-height: 60px; +} + +.inside-navigation { + position: relative; +} + +.main-navigation .inside-navigation { + display: flex; + align-items: center; + flex-wrap: wrap; + justify-content: space-between; +} + +.main-navigation .main-nav > ul { + display: flex; + flex-wrap: wrap; + align-items: center; +} + +.main-navigation li { + position: relative; +} + +.main-navigation .menu-bar-items { + display: flex; + align-items: center; + font-size: 15px; +} + +.main-navigation .menu-bar-items a { + color: inherit; +} + +.main-navigation .menu-bar-item { + position: relative; +} + +.main-navigation .menu-bar-item.search-item { + z-index: 20; +} + +.main-navigation .menu-bar-item > a { + padding-left: 20px; + padding-right: 20px; + line-height: 60px; +} + +.sidebar .main-navigation .main-nav { + flex-basis: 100%; +} + +.sidebar .main-navigation .main-nav > ul { + flex-direction: column; +} + +.sidebar .main-navigation .menu-bar-items { + margin: 0 auto; +} + +.sidebar .main-navigation .menu-bar-items .search-item { + order: 10; +} + +.nav-align-center .inside-navigation { + justify-content: center; +} + +.nav-align-center .main-nav > ul { + justify-content: center; +} + +.nav-align-right .inside-navigation { + justify-content: flex-end; +} + +/*-------------------------------------------------------------- +## Dropdown Menus +--------------------------------------------------------------*/ +.main-navigation ul ul { + display: block; + box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.1); + float: left; + position: absolute; + left: -99999px; + opacity: 0; + z-index: 99999; + width: 200px; + text-align: left; + top: auto; + transition: opacity 80ms linear; + transition-delay: 0s; + pointer-events: none; + height: 0; + overflow: hidden; +} + +.main-navigation ul ul a { + display: block; +} + +.main-navigation ul ul li { + width: 100%; +} + +.main-navigation .main-nav ul ul li a { + line-height: normal; + padding: 10px 20px; + font-size: 14px; +} + +.main-navigation .main-nav ul li.menu-item-has-children > a { + padding-right: 0; + position: relative; +} + +.main-navigation.sub-menu-left .sub-menu { + right: 0; +} + +.main-navigation:not(.toggled) ul li:hover > ul, +.main-navigation:not(.toggled) ul li.sfHover > ul { + left: auto; + opacity: 1; + transition-delay: 150ms; + pointer-events: auto; + height: auto; + overflow: visible; +} + +.main-navigation:not(.toggled) ul ul li:hover > ul, +.main-navigation:not(.toggled) ul ul li.sfHover > ul { + left: 100%; + top: 0; +} + +.main-navigation.sub-menu-left:not(.toggled) ul ul li:hover > ul, +.main-navigation.sub-menu-left:not(.toggled) ul ul li.sfHover > ul { + right: 100%; + left: auto; +} + +.nav-float-right .main-navigation ul ul ul { + top: 0; +} + +.menu-item-has-children .dropdown-menu-toggle { + display: inline-block; + height: 100%; + clear: both; + padding-right: 20px; + padding-left: 10px; +} + +.menu-item-has-children ul .dropdown-menu-toggle { + padding-top: 10px; + padding-bottom: 10px; + margin-top: -10px; +} + +nav ul ul .menu-item-has-children .dropdown-menu-toggle, +.sidebar .menu-item-has-children .dropdown-menu-toggle { + float: right; +} + +/*-------------------------------------------------------------- +## Sidebar Navigation +--------------------------------------------------------------*/ +.widget-area .main-navigation li { + float: none; + display: block; + width: 100%; + padding: 0; + margin: 0; +} + +.sidebar .main-navigation.sub-menu-right ul li:hover ul, +.sidebar .main-navigation.sub-menu-right ul li.sfHover ul { + top: 0; + left: 100%; +} + +.sidebar .main-navigation.sub-menu-left ul li:hover ul, +.sidebar .main-navigation.sub-menu-left ul li.sfHover ul { + top: 0; + right: 100%; +} + +/*-------------------------------------------------------------- +# Post Navigation +--------------------------------------------------------------*/ +.site-main .comment-navigation, +.site-main .posts-navigation, +.site-main .post-navigation { + margin: 0 0 2em; + overflow: hidden; +} + +.site-main .post-navigation { + margin-bottom: 0; +} + +.paging-navigation .nav-previous, +.paging-navigation .nav-next { + display: none; +} + +.paging-navigation .nav-links > * { + padding: 0 5px; +} + +.paging-navigation .nav-links .current { + font-weight: bold; +} + +/* Less specific so we don't overwrite existing customizations. */ +.nav-links > *:first-child { + padding-left: 0; +} + +/*-------------------------------------------------------------- +# Header +--------------------------------------------------------------*/ +.site-header { + position: relative; +} + +.inside-header { + padding: 20px 40px; +} + +.main-title { + margin: 0; + font-size: 25px; + line-height: 1.2em; + word-wrap: break-word; + font-weight: bold; + text-transform: none; +} + +.site-description { + margin: 0; + line-height: 1.5; + font-weight: normal; + text-transform: none; + font-size: 15px; +} + +.site-logo { + display: inline-block; + max-width: 100%; +} + +.site-header .header-image { + vertical-align: middle; +} + +.inside-header { + display: flex; + align-items: center; +} + +.header-widget { + margin-left: auto; +} + +.header-widget p:last-child { + margin-bottom: 0; +} + +.nav-float-right .header-widget { + margin-left: 20px; +} + +.nav-float-right #site-navigation { + margin-left: auto; +} + +.nav-float-left #site-navigation { + margin-right: auto; + order: -10; +} + +.nav-float-left .header-widget { + margin-left: 0; + margin-right: 20px; + order: -15; +} + +.header-aligned-center:not([class*="nav-float-"]) .inside-header { + justify-content: center; + flex-direction: column; + text-align: center; +} + +.header-aligned-center:not([class*="nav-float-"]) .header-widget { + margin-left: auto; + margin-right: auto; +} + +.header-aligned-center:not([class*="nav-float-"]) .inside-header > *:not(:first-child) { + margin-top: 1em; +} + +.header-aligned-right:not([class*="nav-float-"]) .inside-header { + justify-content: flex-end; +} + +.header-aligned-right:not([class*="nav-float-"]) .header-widget { + margin-right: auto; + margin-left: 0; + order: -10; +} + +.site-branding-container { + display: inline-flex; + align-items: center; + text-align: left; + flex-shrink: 0; +} + +.site-branding-container .site-logo { + margin-right: 1em; +} + +/*-------------------------------------------------------------- +# Post Content +--------------------------------------------------------------*/ +.sticky { + display: block; +} + +.posted-on .updated, +.entry-header .gp-icon { + display: none; +} + +.byline, +.single .byline, +.group-blog .byline, +.entry-header .cat-links, +.entry-header .tags-links, +.entry-header .comments-link { + display: inline; +} + +footer.entry-meta .byline, +footer.entry-meta .posted-on { + display: block; +} + +.page-content:not(:first-child), +.entry-content:not(:first-child), +.entry-summary:not(:first-child) { + margin-top: 2em; +} + +.page-links { + clear: both; + margin: 0 0 1.5em; +} + +.blog .format-status .entry-title, +.archive .format-status .entry-title, +.blog .format-aside .entry-header, +.archive .format-aside .entry-header, +.blog .format-status .entry-header, +.archive .format-status .entry-header, +.blog .format-status .entry-meta, +.archive .format-status .entry-meta { + display: none; +} + +.blog .format-aside .entry-content, +.archive .format-aside .entry-content, +.blog .format-status .entry-content, +.archive .format-status .entry-content { + margin-top: 0; +} + +.blog .format-status .entry-content p:last-child, +.archive .format-status .entry-content p:last-child { + margin-bottom: 0; +} + +.site-content, +.entry-header { + word-wrap: break-word; +} + +.entry-title { + margin-bottom: 0; +} + +.author .page-header .page-title { + display: flex; + align-items: center; +} + +.author .page-header .avatar { + margin-right: 20px; +} + +.page-header > *:last-child, +.page-header .author-info > *:last-child { + margin-bottom: 0; +} + +.entry-meta { + font-size: 85%; + margin-top: .5em; + line-height: 1.5; +} + +footer.entry-meta { + margin-top: 2em; +} + +.cat-links, +.tags-links, +.comments-link { + display: block; +} + +.taxonomy-description p:last-child, +.read-more-container, +.page-content > p:last-child, +.entry-content > p:last-child, +.entry-summary > p:last-child { + margin-bottom: 0; +} + +/*-------------------------------------------------------------- +# Media +--------------------------------------------------------------*/ +/*-------------------------------------------------------------- +## Captions +--------------------------------------------------------------*/ +.wp-caption { + margin-bottom: 1.5em; + max-width: 100%; + position: relative; +} + +.wp-caption img[class*="wp-image-"] { + display: block; + margin: 0 auto 0; + max-width: 100%; +} + +.wp-caption .wp-caption-text { + font-size: 75%; + padding-top: 5px; + opacity: 0.8; +} + +.wp-caption img { + position: relative; + vertical-align: bottom; +} + +.wp-block-image figcaption { + font-size: 13px; + text-align: center; +} + +/*-------------------------------------------------------------- +## Galleries +--------------------------------------------------------------*/ +.wp-block-gallery, +ul.blocks-gallery-grid { + margin-left: 0; +} + +.wp-block-gallery .blocks-gallery-image figcaption, +.wp-block-gallery .blocks-gallery-item figcaption { + background: rgba(255, 255, 255, 0.7); + color: #000; + padding: 10px; + box-sizing: border-box; +} + +.gallery { + margin-bottom: 1.5em; +} + +.gallery-item { + display: inline-block; + text-align: center; + vertical-align: top; + width: 100%; +} + +.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; +} + +.site-main .gallery { + margin-bottom: 1.5em; +} + +.gallery-item img { + vertical-align: bottom; +} + +.gallery-icon { + padding: 5px; +} + +embed, +iframe, +object { + max-width: 100%; +} + +/*-------------------------------------------------------------- +# Widgets +--------------------------------------------------------------*/ +.widget-area .widget { + padding: 40px; +} + +.widget select { + max-width: 100%; +} + +.sidebar .widget *:last-child, +.footer-widgets .widget *:last-child { + margin-bottom: 0; +} + +.widget-title { + margin-bottom: 30px; + font-size: 20px; + line-height: 1.5; + font-weight: normal; + text-transform: none; +} + +.widget ul, +.widget ol { + margin: 0; +} + +.widget .search-field { + width: 100%; +} + +.widget .search-form { + display: flex; +} + +.widget .search-form button.search-submit { + font-size: 15px; +} + +.footer-widgets .widget { + margin-bottom: 30px; +} + +.sidebar .widget:last-child, +.footer-widgets .widget:last-child { + margin-bottom: 0; +} + +.widget ul li { + list-style-type: none; + position: relative; + margin-bottom: 0.5em; +} + +.widget ul li ul { + margin-left: 1em; + margin-top: 0.5em; +} + +.wp-calendar-table { + table-layout: fixed; +} + +/*-------------------------------------------------------------- +# Content Layout +--------------------------------------------------------------*/ +.site-content { + display: flex; +} + +.grid-container { + margin-left: auto; + margin-right: auto; + max-width: 1200px; +} + +.sidebar .widget, +.page-header, +.site-main > * { + margin-bottom: 20px; +} + +.both-right .inside-left-sidebar, +.both-left .inside-left-sidebar { + margin-right: 10px; +} + +.both-right .inside-right-sidebar, +.both-left .inside-right-sidebar { + margin-left: 10px; +} + +/*-------------------------------------------------------------- +## One Container +--------------------------------------------------------------*/ +.one-container.right-sidebar .site-main, +.one-container.both-right .site-main { + margin-right: 40px; +} + +.one-container.left-sidebar .site-main, +.one-container.both-left .site-main { + margin-left: 40px; +} + +.one-container.both-sidebars .site-main { + margin: 0px 40px 0px 40px; +} + +.one-container.archive .post:not(:last-child), +.one-container.blog .post:not(:last-child) { + padding-bottom: 40px; +} + +.one-container .site-content { + padding: 40px; +} + +/*-------------------------------------------------------------- +## Separate Containers +--------------------------------------------------------------*/ +.separate-containers .inside-article, +.separate-containers .comments-area, +.separate-containers .page-header, +.separate-containers .paging-navigation { + padding: 40px; +} + +.separate-containers .site-main { + margin: 20px; +} + +.separate-containers.no-sidebar .site-main { + margin-left: 0; + margin-right: 0; +} + +.separate-containers.right-sidebar .site-main, +.separate-containers.both-right .site-main { + margin-left: 0; +} + +.separate-containers.left-sidebar .site-main, +.separate-containers.both-left .site-main { + margin-right: 0; +} + +.separate-containers .inside-right-sidebar, +.separate-containers .inside-left-sidebar { + margin-top: 20px; + margin-bottom: 20px; +} + +.inside-page-header { + padding: 40px; +} + +.widget-area .main-navigation { + margin-bottom: 20px; +} + +.separate-containers .site-main > *:last-child, +.one-container .site-main > *:last-child { + margin-bottom: 0; +} + +/*-------------------------------------------------------------- +## Full Width Content +--------------------------------------------------------------*/ +.full-width-content .container.grid-container { + max-width: 100%; +} + +.full-width-content.no-sidebar.separate-containers .site-main { + margin: 0; +} + +.full-width-content.separate-containers .inside-article, +.full-width-content.one-container .site-content { + padding: 0; +} + +.full-width-content .entry-content .alignwide { + margin-left: 0; + width: auto; + max-width: unset; +} + +/*-------------------------------------------------------------- +## Contained Content +--------------------------------------------------------------*/ +.contained-content.separate-containers .inside-article, +.contained-content.one-container .site-content { + padding: 0; +} + +/*-------------------------------------------------------------- +# Sidebars +--------------------------------------------------------------*/ +.sidebar .grid-container { + max-width: 100%; + width: 100%; +} + +.left-sidebar .sidebar, +.both-left .is-left-sidebar, +.both-sidebars .is-left-sidebar { + order: -10; +} + +.both-left .is-right-sidebar { + order: -5; +} + +.both-right .is-left-sidebar { + order: 5; +} + +.both-right .is-right-sidebar, +.both-sidebars .is-right-sidebar { + order: 10; +} + +/*-------------------------------------------------------------- +# Footer +--------------------------------------------------------------*/ +.inside-site-info { + display: flex; + align-items: center; + justify-content: center; + padding: 20px 40px; +} + +.site-info { + text-align: center; + font-size: 15px; +} + +/*-------------------------------------------------------------- +# Featured Images +--------------------------------------------------------------*/ +.post-image:not(:first-child) { + margin-top: 2em; +} + +.featured-image { + line-height: 0; + /* no more weird spacing */ +} + +.separate-containers .featured-image { + margin-top: 20px; +} + +.separate-containers .inside-article > .featured-image { + margin-top: 0; + margin-bottom: 2em; +} + +.one-container .inside-article > .featured-image { + margin-top: 0; + margin-bottom: 2em; +} + +/*-------------------------------------------------------------- +# Icons +--------------------------------------------------------------*/ +.gp-icon { + display: inline-flex; + align-self: center; +} + +.gp-icon svg { + height: 1em; + width: 1em; + top: .125em; + position: relative; + fill: currentColor; +} + +.icon-menu-bars svg:nth-child(2), +.toggled .icon-menu-bars svg:nth-child(1), +.icon-search svg:nth-child(2), +.close-search .icon-search svg:nth-child(1) { + display: none; +} + +.toggled .icon-menu-bars svg:nth-child(2), +.close-search .icon-search svg:nth-child(2) { + display: block; +} + +.entry-meta .gp-icon { + margin-right: 0.6em; + opacity: 0.7; +} + +nav.toggled .icon-arrow-left svg { + transform: rotate(-90deg); +} + +nav.toggled .icon-arrow-right svg { + transform: rotate(90deg); +} + +nav.toggled .sfHover > a > .dropdown-menu-toggle .gp-icon svg { + transform: rotate(180deg); +} + +nav.toggled .sfHover > a > .dropdown-menu-toggle .gp-icon.icon-arrow-left svg { + transform: rotate(-270deg); +} + +nav.toggled .sfHover > a > .dropdown-menu-toggle .gp-icon.icon-arrow-right svg { + transform: rotate(270deg); +} + +/*-------------------------------------------------------------- +# Compatibility +--------------------------------------------------------------*/ +/* Bootstrap fix */ +.container.grid-container { + width: auto; +} + +/*-------------------------------------------------------------- +# Mobile +--------------------------------------------------------------*/ +/*-------------------------------------------------------------- +# Mobile Menu +--------------------------------------------------------------*/ +.menu-toggle, +.mobile-bar-items, +.sidebar-nav-mobile { + display: none; +} + +.menu-toggle { + padding: 0 20px; + line-height: 60px; + margin: 0; + font-weight: normal; + text-transform: none; + font-size: 15px; + cursor: pointer; +} + +.menu-toggle .mobile-menu { + padding-left: 3px; +} + +.menu-toggle .gp-icon + .mobile-menu { + padding-left: 9px; +} + +.menu-toggle .mobile-menu:empty { + display: none; +} + +button.menu-toggle { + background-color: transparent; + flex-grow: 1; + border: 0; + text-align: center; +} + +button.menu-toggle:hover, button.menu-toggle:active, button.menu-toggle:focus { + background-color: transparent; +} + +.has-menu-bar-items button.menu-toggle { + flex-grow: 0; +} + +nav.toggled ul ul.sub-menu { + width: 100%; +} + +.toggled .menu-item-has-children .dropdown-menu-toggle { + padding-left: 20px; +} + +.main-navigation.toggled .main-nav { + flex-basis: 100%; + order: 3; +} + +.main-navigation.toggled .main-nav > ul { + display: block; +} + +.main-navigation.toggled .main-nav li { + width: 100%; + text-align: left; +} + +.main-navigation.toggled .main-nav ul ul { + transition: 0s; + visibility: hidden; +} + +.main-navigation.toggled .main-nav ul ul.toggled-on { + position: relative; + top: 0; + left: auto !important; + right: auto !important; + width: 100%; + pointer-events: auto; + height: auto; + opacity: 1; + display: block; + visibility: visible; + float: none; +} + +.main-navigation.toggled .menu-item-has-children .dropdown-menu-toggle { + float: right; +} + +.mobile-menu-control-wrapper { + display: none; + margin-left: auto; + align-items: center; +} + +.has-inline-mobile-toggle #site-navigation.toggled { + margin-top: 1.5em; +} + +.has-inline-mobile-toggle #site-navigation.has-active-search { + margin-top: 1.5em; +} + +.has-inline-mobile-toggle #site-navigation.has-active-search .nav-search-active { + position: relative; +} + +.has-inline-mobile-toggle #site-navigation.has-active-search .navigation-search input { + outline: auto; +} + +.nav-float-left .mobile-menu-control-wrapper { + order: -10; + margin-left: 0; + margin-right: auto; + flex-direction: row-reverse; +} + +/*-------------------------------------------------------------- +## Breakpoint (768px) +--------------------------------------------------------------*/ +@media (max-width: 768px) { + .hide-on-mobile { + display: none !important; + } + /*-------------------------------------------------------------- + ## Links + --------------------------------------------------------------*/ + a, body, button, input, select, textarea { + transition: all 0s ease-in-out; + } + /*-------------------------------------------------------------- + ## Header + --------------------------------------------------------------*/ + .inside-header { + flex-direction: column; + text-align: center; + } + .site-header .header-widget { + margin-top: 1.5em; + margin-left: auto; + margin-right: auto; + text-align: center; + } + /*-------------------------------------------------------------- + ## Content Area + --------------------------------------------------------------*/ + .site-content { + flex-direction: column; + } + .container .site-content .content-area { + width: auto; + } + .is-left-sidebar.sidebar, + .is-right-sidebar.sidebar { + width: auto; + order: initial; + } + .is-left-sidebar + .is-right-sidebar .inside-right-sidebar { + margin-top: 0; + } + .both-right .inside-left-sidebar, + .both-left .inside-left-sidebar, + .both-right .inside-right-sidebar, + .both-left .inside-right-sidebar { + margin-right: 0; + margin-left: 0; + } + #main { + margin-left: 0; + margin-right: 0; + } + body:not(.no-sidebar) #main { + margin-bottom: 0; + } + .alignleft, + .alignright { + float: none; + display: block; + margin-left: auto; + margin-right: auto; + } + .comment .children { + padding-left: 10px; + margin-left: 0; + } + .entry-meta { + font-size: inherit; + } + .entry-meta a { + line-height: 1.8em; + } +} + +@media (min-width: 769px) and (max-width: 1024px) { + .hide-on-tablet { + display: none !important; + } +} + +@media (min-width: 1025px) { + .hide-on-desktop { + display: none !important; + } +} diff --git a/wp-content/themes/generatepress/assets/css/main.min.css b/wp-content/themes/generatepress/assets/css/main.min.css index 0a92e3a9..f2240416 100644 --- a/wp-content/themes/generatepress/assets/css/main.min.css +++ b/wp-content/themes/generatepress/assets/css/main.min.css @@ -1 +1 @@ -blockquote,body,dd,dl,dt,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,html,iframe,legend,li,ol,p,pre,textarea,ul{margin:0;padding:0;border:0}html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}main{display:block}progress{vertical-align:baseline}html{box-sizing:border-box}*,::after,::before{box-sizing:inherit}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;margin:0}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-moz-focus-inner{border-style:none;padding:0}:-moz-focusring{outline:1px dotted ButtonText}body,button,input,select,textarea{font-family:-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-weight:400;text-transform:none;font-size:17px;line-height:1.5}p{margin-bottom:1.5em}h1,h2,h3,h4,h5,h6{font-family:inherit;font-size:100%;font-style:inherit;font-weight:inherit}pre{background:rgba(0,0,0,.05);font-family:inherit;font-size:inherit;line-height:normal;margin-bottom:1.5em;padding:20px;overflow:auto;max-width:100%}blockquote{border-left:5px solid rgba(0,0,0,.05);padding:20px;font-size:1.2em;font-style:italic;margin:0 0 1.5em;position:relative}blockquote p:last-child{margin:0}table,td,th{border:1px solid rgba(0,0,0,.1)}table{border-collapse:separate;border-spacing:0;border-width:1px 0 0 1px;margin:0 0 1.5em;width:100%}td,th{padding:8px}th{border-width:0 1px 1px 0}td{border-width:0 1px 1px 0}hr{background-color:rgba(0,0,0,.1);border:0;height:1px;margin-bottom:40px;margin-top:40px}fieldset{padding:0;border:0;min-width:inherit}fieldset legend{padding:0;margin-bottom:1.5em}h1{font-size:42px;margin-bottom:20px;line-height:1.2em;font-weight:400;text-transform:none}h2{font-size:35px;margin-bottom:20px;line-height:1.2em;font-weight:400;text-transform:none}h3{font-size:29px;margin-bottom:20px;line-height:1.2em;font-weight:400;text-transform:none}h4{font-size:24px}h5{font-size:20px}h4,h5,h6{margin-bottom:20px}ol,ul{margin:0 0 1.5em 3em}ul{list-style:disc}ol{list-style:decimal}li>ol,li>ul{margin-bottom:0;margin-left:1.5em}dt{font-weight:700}dd{margin:0 1.5em 1.5em}b,strong{font-weight:700}cite,dfn,em,i{font-style:italic}address{margin:0 0 1.5em}code,kbd,tt,var{font:15px Monaco,Consolas,"Andale Mono","DejaVu Sans Mono",monospace}abbr,acronym{border-bottom:1px dotted #666;cursor:help}ins,mark{text-decoration:none}sub,sup{font-size:75%;height:0;line-height:0;position:relative;vertical-align:baseline}sup{bottom:1ex}sub{top:.5ex}small{font-size:75%}big{font-size:125%}figure{margin:0}table{margin:0 0 1.5em;width:100%}th{font-weight:700}img{height:auto;max-width:100%}button,input[type=button],input[type=reset],input[type=submit]{background:#55555e;color:#fff;border:1px solid transparent;cursor:pointer;-webkit-appearance:button;padding:10px 20px}input[type=email],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=url],select,textarea{border:1px solid;border-radius:0;padding:10px 15px;max-width:100%}textarea{width:100%}a,button,input{transition:color .1s ease-in-out,background-color .1s ease-in-out}a,a:focus,a:hover,a:visited{text-decoration:none}.button,.wp-block-button .wp-block-button__link{padding:10px 20px;display:inline-block}.wp-block-button .wp-block-button__link{font-size:inherit;line-height:inherit}.using-mouse :focus{outline:0}.using-mouse ::-moz-focus-inner{border:0}.alignleft{float:left;margin-right:1.5em}.alignright{float:right;margin-left:1.5em}.aligncenter{clear:both;display:block;margin:0 auto}.size-auto,.size-full,.size-large,.size-medium,.size-thumbnail{max-width:100%;height:auto}.no-sidebar .entry-content .alignfull{margin-left:calc(-100vw / 2 + 100% / 2);margin-right:calc(-100vw / 2 + 100% / 2);max-width:100vw;width:auto}.screen-reader-text{border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute!important;width:1px;word-wrap:normal!important}.screen-reader-text:focus{background-color:#f1f1f1;border-radius:3px;box-shadow:0 0 2px 2px rgba(0,0,0,.6);clip:auto!important;-webkit-clip-path:none;clip-path:none;color:#21759b;display:block;font-size:.875rem;font-weight:700;height:auto;left:5px;line-height:normal;padding:15px 23px 14px;text-decoration:none;top:5px;width:auto;z-index:100000}#primary[tabindex="-1"]:focus{outline:0}.main-navigation{z-index:100;padding:0;clear:both;display:block}.main-navigation a{display:block;text-decoration:none;font-weight:400;text-transform:none;font-size:15px}.main-navigation ul{list-style:none;margin:0;padding-left:0}.main-navigation .main-nav ul li a{padding-left:20px;padding-right:20px;line-height:60px}.inside-navigation{position:relative}.main-navigation .inside-navigation{display:flex;align-items:center;flex-wrap:wrap;justify-content:space-between}.main-navigation .main-nav>ul{display:flex;flex-wrap:wrap;align-items:center}.main-navigation li{position:relative}.main-navigation .menu-bar-items{display:flex;align-items:center;font-size:15px}.main-navigation .menu-bar-items a{color:inherit}.main-navigation .menu-bar-item{position:relative}.main-navigation .menu-bar-item.search-item{z-index:20}.main-navigation .menu-bar-item>a{padding-left:20px;padding-right:20px;line-height:60px}.sidebar .main-navigation .main-nav{flex-basis:100%}.sidebar .main-navigation .main-nav>ul{flex-direction:column}.sidebar .main-navigation .menu-bar-items{margin:0 auto}.sidebar .main-navigation .menu-bar-items .search-item{order:10}.nav-align-center .inside-navigation{justify-content:center}.nav-align-center .main-nav>ul{justify-content:center}.nav-align-right .inside-navigation{justify-content:flex-end}.main-navigation ul ul{display:block;box-shadow:1px 1px 0 rgba(0,0,0,.1);float:left;position:absolute;left:-99999px;opacity:0;z-index:99999;width:200px;text-align:left;top:auto;transition:opacity 80ms linear;transition-delay:0s;pointer-events:none;height:0;overflow:hidden}.main-navigation ul ul a{display:block}.main-navigation ul ul li{width:100%}.main-navigation .main-nav ul ul li a{line-height:normal;padding:10px 20px;font-size:14px}.main-navigation .main-nav ul li.menu-item-has-children>a{padding-right:0;position:relative}.main-navigation.sub-menu-left .sub-menu{right:0}.main-navigation:not(.toggled) ul li.sfHover>ul,.main-navigation:not(.toggled) ul li:hover>ul{left:auto;opacity:1;transition-delay:150ms;pointer-events:auto;height:auto;overflow:visible}.main-navigation:not(.toggled) ul ul li.sfHover>ul,.main-navigation:not(.toggled) ul ul li:hover>ul{left:100%;top:0}.main-navigation.sub-menu-left:not(.toggled) ul ul li.sfHover>ul,.main-navigation.sub-menu-left:not(.toggled) ul ul li:hover>ul{right:100%;left:auto}.nav-float-right .main-navigation ul ul ul{top:0}.menu-item-has-children .dropdown-menu-toggle{display:inline-block;height:100%;clear:both;padding-right:20px;padding-left:10px}.menu-item-has-children ul .dropdown-menu-toggle{padding-top:10px;padding-bottom:10px;margin-top:-10px}.sidebar .menu-item-has-children .dropdown-menu-toggle,nav ul ul .menu-item-has-children .dropdown-menu-toggle{float:right}.widget-area .main-navigation li{float:none;display:block;width:100%;padding:0;margin:0}.sidebar .main-navigation.sub-menu-right ul li.sfHover ul,.sidebar .main-navigation.sub-menu-right ul li:hover ul{top:0;left:100%}.sidebar .main-navigation.sub-menu-left ul li.sfHover ul,.sidebar .main-navigation.sub-menu-left ul li:hover ul{top:0;right:100%}.site-main .comment-navigation,.site-main .post-navigation,.site-main .posts-navigation{margin:0 0 2em;overflow:hidden}.site-main .post-navigation{margin-bottom:0}.paging-navigation .nav-next,.paging-navigation .nav-previous{display:none}.paging-navigation .nav-links>*{padding:0 5px}.paging-navigation .nav-links .current{font-weight:700}.nav-links>:first-child{padding-left:0}.site-header{position:relative}.inside-header{padding:20px 40px}.main-title{margin:0;font-size:25px;line-height:1.2em;word-wrap:break-word;font-weight:700;text-transform:none}.site-description{margin:0;line-height:1.5;font-weight:400;text-transform:none;font-size:15px}.site-logo{display:inline-block;max-width:100%}.site-header .header-image{vertical-align:middle}.inside-header{display:flex;align-items:center}.header-widget{margin-left:auto}.header-widget p:last-child{margin-bottom:0}.nav-float-right .header-widget{margin-left:20px}.nav-float-right #site-navigation{margin-left:auto}.nav-float-left #site-navigation{margin-right:auto;order:-10}.nav-float-left .header-widget{margin-left:0;margin-right:20px;order:-15}.header-aligned-center:not([class*=nav-float-]) .inside-header{justify-content:center;flex-direction:column;text-align:center}.header-aligned-center:not([class*=nav-float-]) .header-widget{margin-left:auto;margin-right:auto}.header-aligned-center:not([class*=nav-float-]) .inside-header>:not(:first-child){margin-top:1em}.header-aligned-right:not([class*=nav-float-]) .inside-header{justify-content:flex-end}.header-aligned-right:not([class*=nav-float-]) .header-widget{margin-right:auto;margin-left:0;order:-10}.site-branding-container{display:inline-flex;align-items:center;text-align:left;flex-shrink:0}.site-branding-container .site-logo{margin-right:1em}.sticky{display:block}.entry-header .gp-icon,.posted-on .updated{display:none}.byline,.entry-header .cat-links,.entry-header .comments-link,.entry-header .tags-links,.group-blog .byline,.single .byline{display:inline}footer.entry-meta .byline,footer.entry-meta .posted-on{display:block}.entry-content:not(:first-child),.entry-summary:not(:first-child),.page-content:not(:first-child){margin-top:2em}.page-links{clear:both;margin:0 0 1.5em}.archive .format-aside .entry-header,.archive .format-status .entry-header,.archive .format-status .entry-meta,.archive .format-status .entry-title,.blog .format-aside .entry-header,.blog .format-status .entry-header,.blog .format-status .entry-meta,.blog .format-status .entry-title{display:none}.archive .format-aside .entry-content,.archive .format-status .entry-content,.blog .format-aside .entry-content,.blog .format-status .entry-content{margin-top:0}.archive .format-status .entry-content p:last-child,.blog .format-status .entry-content p:last-child{margin-bottom:0}.entry-header,.site-content{word-wrap:break-word}.entry-title{margin-bottom:0}.author .page-header .page-title{display:flex;align-items:center}.author .page-header .avatar{margin-right:20px}.page-header .author-info>:last-child,.page-header>:last-child{margin-bottom:0}.entry-meta{font-size:85%;margin-top:.5em;line-height:1.5}footer.entry-meta{margin-top:2em}.cat-links,.comments-link,.tags-links{display:block}.entry-content>p:last-child,.entry-summary>p:last-child,.page-content>p:last-child,.read-more-container,.taxonomy-description p:last-child{margin-bottom:0}.wp-caption{margin-bottom:1.5em;max-width:100%;position:relative}.wp-caption img[class*=wp-image-]{display:block;margin:0 auto 0;max-width:100%}.wp-caption .wp-caption-text{font-size:75%;padding-top:5px;opacity:.8}.wp-caption img{position:relative;vertical-align:bottom}.wp-block-image figcaption{font-size:13px;text-align:center}.wp-block-gallery,ul.blocks-gallery-grid{margin-left:0}.wp-block-gallery .blocks-gallery-image figcaption,.wp-block-gallery .blocks-gallery-item figcaption{background:rgba(255,255,255,.7);color:#000;padding:10px;box-sizing:border-box}.gallery{margin-bottom:1.5em}.gallery-item{display:inline-block;text-align:center;vertical-align:top;width:100%}.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}.site-main .gallery{margin-bottom:1.5em}.gallery-item img{vertical-align:bottom}.gallery-icon{padding:5px}embed,iframe,object{max-width:100%}.widget-area .widget{padding:40px}.widget select{max-width:100%}.footer-widgets .widget :last-child,.sidebar .widget :last-child{margin-bottom:0}.widget-title{margin-bottom:30px;font-size:20px;line-height:1.5;font-weight:400;text-transform:none}.widget ol,.widget ul{margin:0}.widget .search-field{width:100%}.widget .search-form{display:flex}.widget .search-form button.search-submit{font-size:15px}.footer-widgets .widget{margin-bottom:30px}.footer-widgets .widget:last-child,.sidebar .widget:last-child{margin-bottom:0}.widget ul li{list-style-type:none;position:relative;margin-bottom:.5em}.widget ul li ul{margin-left:1em;margin-top:.5em}.wp-calendar-table{table-layout:fixed}.site-content{display:flex}.grid-container{margin-left:auto;margin-right:auto;max-width:1200px}.page-header,.sidebar .widget,.site-main>*{margin-bottom:20px}.both-left .inside-left-sidebar,.both-right .inside-left-sidebar{margin-right:10px}.both-left .inside-right-sidebar,.both-right .inside-right-sidebar{margin-left:10px}.one-container.both-right .site-main,.one-container.right-sidebar .site-main{margin-right:40px}.one-container.both-left .site-main,.one-container.left-sidebar .site-main{margin-left:40px}.one-container.both-sidebars .site-main{margin:0 40px 0 40px}.one-container.archive .post:not(:last-child),.one-container.blog .post:not(:last-child){padding-bottom:40px}.one-container .site-content{padding:40px}.separate-containers .comments-area,.separate-containers .inside-article,.separate-containers .page-header,.separate-containers .paging-navigation{padding:40px}.separate-containers .site-main{margin:20px}.separate-containers.no-sidebar .site-main{margin-left:0;margin-right:0}.separate-containers.both-right .site-main,.separate-containers.right-sidebar .site-main{margin-left:0}.separate-containers.both-left .site-main,.separate-containers.left-sidebar .site-main{margin-right:0}.separate-containers .inside-left-sidebar,.separate-containers .inside-right-sidebar{margin-top:20px;margin-bottom:20px}.inside-page-header,.wp-block-group__inner-container{padding:40px}.widget-area .main-navigation{margin-bottom:20px}.one-container .site-main>:last-child,.separate-containers .site-main>:last-child{margin-bottom:0}.full-width-content .container.grid-container{max-width:100%}.full-width-content.no-sidebar.separate-containers .site-main{margin:0}.full-width-content.one-container .site-content,.full-width-content.separate-containers .inside-article{padding:0}.full-width-content .entry-content .alignwide{margin-left:0;width:auto;max-width:unset}.contained-content.one-container .site-content,.contained-content.separate-containers .inside-article{padding:0}.sidebar .grid-container{max-width:100%;width:100%}.both-left .is-left-sidebar,.both-sidebars .is-left-sidebar,.left-sidebar .sidebar{order:-10}.both-left .is-right-sidebar{order:-5}.both-right .is-left-sidebar{order:5}.both-right .is-right-sidebar,.both-sidebars .is-right-sidebar{order:10}.inside-site-info{display:flex;align-items:center;justify-content:center;padding:20px 40px}.site-info{text-align:center;font-size:15px}.post-image:not(:first-child){margin-top:2em}.featured-image{line-height:0}.separate-containers .featured-image{margin-top:20px}.separate-containers .inside-article>.featured-image{margin-top:0;margin-bottom:2em}.one-container .inside-article>.featured-image{margin-top:0;margin-bottom:2em}.gp-icon{display:inline-flex;align-self:center}.gp-icon svg{height:1em;width:1em;top:.125em;position:relative;fill:currentColor}.close-search .icon-search svg:nth-child(1),.icon-menu-bars svg:nth-child(2),.icon-search svg:nth-child(2),.toggled .icon-menu-bars svg:nth-child(1){display:none}.close-search .icon-search svg:nth-child(2),.toggled .icon-menu-bars svg:nth-child(2){display:block}.entry-meta .gp-icon{margin-right:.6em;opacity:.7}nav.toggled .icon-arrow-left svg{transform:rotate(-90deg)}nav.toggled .icon-arrow-right svg{transform:rotate(90deg)}nav.toggled .sfHover>a>.dropdown-menu-toggle .gp-icon svg{transform:rotate(180deg)}nav.toggled .sfHover>a>.dropdown-menu-toggle .gp-icon.icon-arrow-left svg{transform:rotate(-270deg)}nav.toggled .sfHover>a>.dropdown-menu-toggle .gp-icon.icon-arrow-right svg{transform:rotate(270deg)}.container.grid-container{width:auto}.menu-toggle,.mobile-bar-items,.sidebar-nav-mobile{display:none}.menu-toggle{padding:0 20px;line-height:60px;margin:0;font-weight:400;text-transform:none;font-size:15px;cursor:pointer}.menu-toggle .mobile-menu{padding-left:3px}.menu-toggle .gp-icon+.mobile-menu{padding-left:9px}.menu-toggle .mobile-menu:empty{display:none}button.menu-toggle{background-color:transparent;flex-grow:1;border:0;text-align:center}button.menu-toggle:active,button.menu-toggle:focus,button.menu-toggle:hover{background-color:transparent}.has-menu-bar-items button.menu-toggle{flex-grow:0}nav.toggled ul ul.sub-menu{width:100%}.toggled .menu-item-has-children .dropdown-menu-toggle{padding-left:20px}.main-navigation.toggled .main-nav{flex-basis:100%;order:3}.main-navigation.toggled .main-nav>ul{display:block}.main-navigation.toggled .main-nav li{width:100%;text-align:left}.main-navigation.toggled .main-nav ul ul{transition:0s;visibility:hidden}.main-navigation.toggled .main-nav ul ul.toggled-on{position:relative;top:0;left:auto!important;right:auto!important;width:100%;pointer-events:auto;height:auto;opacity:1;display:block;visibility:visible;float:none}.main-navigation.toggled .menu-item-has-children .dropdown-menu-toggle{float:right}.mobile-menu-control-wrapper{display:none;margin-left:auto;align-items:center}.has-inline-mobile-toggle #site-navigation.toggled{margin-top:1.5em}.has-inline-mobile-toggle #site-navigation.has-active-search{margin-top:1.5em}.has-inline-mobile-toggle #site-navigation.has-active-search .nav-search-active{position:relative}.has-inline-mobile-toggle #site-navigation.has-active-search .navigation-search input{outline:auto}.nav-float-left .mobile-menu-control-wrapper{order:-10;margin-left:0;margin-right:auto;flex-direction:row-reverse}@media (max-width:768px){.hide-on-mobile{display:none!important}a,body,button,input,select,textarea{transition:all 0s ease-in-out}.inside-header{flex-direction:column;text-align:center}.site-header .header-widget{margin-top:1.5em;margin-left:auto;margin-right:auto;text-align:center}.site-content{flex-direction:column}.container .site-content .content-area{width:auto}.is-left-sidebar.sidebar,.is-right-sidebar.sidebar{width:auto;order:initial}.is-left-sidebar+.is-right-sidebar .inside-right-sidebar{margin-top:0}.both-left .inside-left-sidebar,.both-left .inside-right-sidebar,.both-right .inside-left-sidebar,.both-right .inside-right-sidebar{margin-right:0;margin-left:0}#main{margin-left:0;margin-right:0}body:not(.no-sidebar) #main{margin-bottom:0}.alignleft,.alignright{float:none;display:block;margin-left:auto;margin-right:auto}.comment .children{padding-left:10px;margin-left:0}.entry-meta{font-size:inherit}.entry-meta a{line-height:1.8em}}@media (min-width:769px) and (max-width:1024px){.hide-on-tablet{display:none!important}}@media (min-width:1025px){.hide-on-desktop{display:none!important}} \ No newline at end of file +blockquote,body,dd,dl,dt,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,html,iframe,legend,li,ol,p,pre,textarea,ul{margin:0;padding:0;border:0}html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}main{display:block}progress{vertical-align:baseline}html{box-sizing:border-box}*,::after,::before{box-sizing:inherit}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;margin:0}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-moz-focus-inner{border-style:none;padding:0}:-moz-focusring{outline:1px dotted ButtonText}body,button,input,select,textarea{font-family:-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-weight:400;text-transform:none;font-size:17px;line-height:1.5}p{margin-bottom:1.5em}h1,h2,h3,h4,h5,h6{font-family:inherit;font-size:100%;font-style:inherit;font-weight:inherit}pre{background:rgba(0,0,0,.05);font-family:inherit;font-size:inherit;line-height:normal;margin-bottom:1.5em;padding:20px;overflow:auto;max-width:100%}blockquote{border-left:5px solid rgba(0,0,0,.05);padding:20px;font-size:1.2em;font-style:italic;margin:0 0 1.5em;position:relative}blockquote p:last-child{margin:0}table,td,th{border:1px solid rgba(0,0,0,.1)}table{border-collapse:separate;border-spacing:0;border-width:1px 0 0 1px;margin:0 0 1.5em;width:100%}td,th{padding:8px}th{border-width:0 1px 1px 0}td{border-width:0 1px 1px 0}hr{background-color:rgba(0,0,0,.1);border:0;height:1px;margin-bottom:40px;margin-top:40px}fieldset{padding:0;border:0;min-width:inherit}fieldset legend{padding:0;margin-bottom:1.5em}h1{font-size:42px;margin-bottom:20px;line-height:1.2em;font-weight:400;text-transform:none}h2{font-size:35px;margin-bottom:20px;line-height:1.2em;font-weight:400;text-transform:none}h3{font-size:29px;margin-bottom:20px;line-height:1.2em;font-weight:400;text-transform:none}h4{font-size:24px}h5{font-size:20px}h4,h5,h6{margin-bottom:20px}ol,ul{margin:0 0 1.5em 3em}ul{list-style:disc}ol{list-style:decimal}li>ol,li>ul{margin-bottom:0;margin-left:1.5em}dt{font-weight:700}dd{margin:0 1.5em 1.5em}b,strong{font-weight:700}cite,dfn,em,i{font-style:italic}address{margin:0 0 1.5em}code,kbd,tt,var{font:15px Monaco,Consolas,"Andale Mono","DejaVu Sans Mono",monospace}abbr,acronym{border-bottom:1px dotted #666;cursor:help}ins,mark{text-decoration:none}sub,sup{font-size:75%;height:0;line-height:0;position:relative;vertical-align:baseline}sup{bottom:1ex}sub{top:.5ex}small{font-size:75%}big{font-size:125%}figure{margin:0}table{margin:0 0 1.5em;width:100%}th{font-weight:700}img{height:auto;max-width:100%}button,input[type=button],input[type=reset],input[type=submit]{background:#55555e;color:#fff;border:1px solid transparent;cursor:pointer;-webkit-appearance:button;padding:10px 20px}input[type=email],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=url],select,textarea{border:1px solid;border-radius:0;padding:10px 15px;max-width:100%}textarea{width:100%}a,button,input{transition:color .1s ease-in-out,background-color .1s ease-in-out}a,a:focus,a:hover,a:visited{text-decoration:none}.button,.wp-block-button .wp-block-button__link{padding:10px 20px;display:inline-block}.wp-block-button .wp-block-button__link{font-size:inherit;line-height:inherit}.using-mouse :focus{outline:0}.using-mouse ::-moz-focus-inner{border:0}.alignleft{float:left;margin-right:1.5em}.alignright{float:right;margin-left:1.5em}.aligncenter{clear:both;display:block;margin:0 auto}.size-auto,.size-full,.size-large,.size-medium,.size-thumbnail{max-width:100%;height:auto}.no-sidebar .entry-content .alignfull{margin-left:calc(-100vw / 2 + 100% / 2);margin-right:calc(-100vw / 2 + 100% / 2);max-width:100vw;width:auto}.screen-reader-text{border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute!important;width:1px;word-wrap:normal!important}.screen-reader-text:focus{background-color:#f1f1f1;border-radius:3px;box-shadow:0 0 2px 2px rgba(0,0,0,.6);clip:auto!important;-webkit-clip-path:none;clip-path:none;color:#21759b;display:block;font-size:.875rem;font-weight:700;height:auto;left:5px;line-height:normal;padding:15px 23px 14px;text-decoration:none;top:5px;width:auto;z-index:100000}#primary[tabindex="-1"]:focus{outline:0}.main-navigation{z-index:100;padding:0;clear:both;display:block}.main-navigation a{display:block;text-decoration:none;font-weight:400;text-transform:none;font-size:15px}.main-navigation ul{list-style:none;margin:0;padding-left:0}.main-navigation .main-nav ul li a{padding-left:20px;padding-right:20px;line-height:60px}.inside-navigation{position:relative}.main-navigation .inside-navigation{display:flex;align-items:center;flex-wrap:wrap;justify-content:space-between}.main-navigation .main-nav>ul{display:flex;flex-wrap:wrap;align-items:center}.main-navigation li{position:relative}.main-navigation .menu-bar-items{display:flex;align-items:center;font-size:15px}.main-navigation .menu-bar-items a{color:inherit}.main-navigation .menu-bar-item{position:relative}.main-navigation .menu-bar-item.search-item{z-index:20}.main-navigation .menu-bar-item>a{padding-left:20px;padding-right:20px;line-height:60px}.sidebar .main-navigation .main-nav{flex-basis:100%}.sidebar .main-navigation .main-nav>ul{flex-direction:column}.sidebar .main-navigation .menu-bar-items{margin:0 auto}.sidebar .main-navigation .menu-bar-items .search-item{order:10}.nav-align-center .inside-navigation{justify-content:center}.nav-align-center .main-nav>ul{justify-content:center}.nav-align-right .inside-navigation{justify-content:flex-end}.main-navigation ul ul{display:block;box-shadow:1px 1px 0 rgba(0,0,0,.1);float:left;position:absolute;left:-99999px;opacity:0;z-index:99999;width:200px;text-align:left;top:auto;transition:opacity 80ms linear;transition-delay:0s;pointer-events:none;height:0;overflow:hidden}.main-navigation ul ul a{display:block}.main-navigation ul ul li{width:100%}.main-navigation .main-nav ul ul li a{line-height:normal;padding:10px 20px;font-size:14px}.main-navigation .main-nav ul li.menu-item-has-children>a{padding-right:0;position:relative}.main-navigation.sub-menu-left .sub-menu{right:0}.main-navigation:not(.toggled) ul li.sfHover>ul,.main-navigation:not(.toggled) ul li:hover>ul{left:auto;opacity:1;transition-delay:150ms;pointer-events:auto;height:auto;overflow:visible}.main-navigation:not(.toggled) ul ul li.sfHover>ul,.main-navigation:not(.toggled) ul ul li:hover>ul{left:100%;top:0}.main-navigation.sub-menu-left:not(.toggled) ul ul li.sfHover>ul,.main-navigation.sub-menu-left:not(.toggled) ul ul li:hover>ul{right:100%;left:auto}.nav-float-right .main-navigation ul ul ul{top:0}.menu-item-has-children .dropdown-menu-toggle{display:inline-block;height:100%;clear:both;padding-right:20px;padding-left:10px}.menu-item-has-children ul .dropdown-menu-toggle{padding-top:10px;padding-bottom:10px;margin-top:-10px}.sidebar .menu-item-has-children .dropdown-menu-toggle,nav ul ul .menu-item-has-children .dropdown-menu-toggle{float:right}.widget-area .main-navigation li{float:none;display:block;width:100%;padding:0;margin:0}.sidebar .main-navigation.sub-menu-right ul li.sfHover ul,.sidebar .main-navigation.sub-menu-right ul li:hover ul{top:0;left:100%}.sidebar .main-navigation.sub-menu-left ul li.sfHover ul,.sidebar .main-navigation.sub-menu-left ul li:hover ul{top:0;right:100%}.site-main .comment-navigation,.site-main .post-navigation,.site-main .posts-navigation{margin:0 0 2em;overflow:hidden}.site-main .post-navigation{margin-bottom:0}.paging-navigation .nav-next,.paging-navigation .nav-previous{display:none}.paging-navigation .nav-links>*{padding:0 5px}.paging-navigation .nav-links .current{font-weight:700}.nav-links>:first-child{padding-left:0}.site-header{position:relative}.inside-header{padding:20px 40px}.main-title{margin:0;font-size:25px;line-height:1.2em;word-wrap:break-word;font-weight:700;text-transform:none}.site-description{margin:0;line-height:1.5;font-weight:400;text-transform:none;font-size:15px}.site-logo{display:inline-block;max-width:100%}.site-header .header-image{vertical-align:middle}.inside-header{display:flex;align-items:center}.header-widget{margin-left:auto}.header-widget p:last-child{margin-bottom:0}.nav-float-right .header-widget{margin-left:20px}.nav-float-right #site-navigation{margin-left:auto}.nav-float-left #site-navigation{margin-right:auto;order:-10}.nav-float-left .header-widget{margin-left:0;margin-right:20px;order:-15}.header-aligned-center:not([class*=nav-float-]) .inside-header{justify-content:center;flex-direction:column;text-align:center}.header-aligned-center:not([class*=nav-float-]) .header-widget{margin-left:auto;margin-right:auto}.header-aligned-center:not([class*=nav-float-]) .inside-header>:not(:first-child){margin-top:1em}.header-aligned-right:not([class*=nav-float-]) .inside-header{justify-content:flex-end}.header-aligned-right:not([class*=nav-float-]) .header-widget{margin-right:auto;margin-left:0;order:-10}.site-branding-container{display:inline-flex;align-items:center;text-align:left;flex-shrink:0}.site-branding-container .site-logo{margin-right:1em}.sticky{display:block}.entry-header .gp-icon,.posted-on .updated{display:none}.byline,.entry-header .cat-links,.entry-header .comments-link,.entry-header .tags-links,.group-blog .byline,.single .byline{display:inline}footer.entry-meta .byline,footer.entry-meta .posted-on{display:block}.entry-content:not(:first-child),.entry-summary:not(:first-child),.page-content:not(:first-child){margin-top:2em}.page-links{clear:both;margin:0 0 1.5em}.archive .format-aside .entry-header,.archive .format-status .entry-header,.archive .format-status .entry-meta,.archive .format-status .entry-title,.blog .format-aside .entry-header,.blog .format-status .entry-header,.blog .format-status .entry-meta,.blog .format-status .entry-title{display:none}.archive .format-aside .entry-content,.archive .format-status .entry-content,.blog .format-aside .entry-content,.blog .format-status .entry-content{margin-top:0}.archive .format-status .entry-content p:last-child,.blog .format-status .entry-content p:last-child{margin-bottom:0}.entry-header,.site-content{word-wrap:break-word}.entry-title{margin-bottom:0}.author .page-header .page-title{display:flex;align-items:center}.author .page-header .avatar{margin-right:20px}.page-header .author-info>:last-child,.page-header>:last-child{margin-bottom:0}.entry-meta{font-size:85%;margin-top:.5em;line-height:1.5}footer.entry-meta{margin-top:2em}.cat-links,.comments-link,.tags-links{display:block}.entry-content>p:last-child,.entry-summary>p:last-child,.page-content>p:last-child,.read-more-container,.taxonomy-description p:last-child{margin-bottom:0}.wp-caption{margin-bottom:1.5em;max-width:100%;position:relative}.wp-caption img[class*=wp-image-]{display:block;margin:0 auto 0;max-width:100%}.wp-caption .wp-caption-text{font-size:75%;padding-top:5px;opacity:.8}.wp-caption img{position:relative;vertical-align:bottom}.wp-block-image figcaption{font-size:13px;text-align:center}.wp-block-gallery,ul.blocks-gallery-grid{margin-left:0}.wp-block-gallery .blocks-gallery-image figcaption,.wp-block-gallery .blocks-gallery-item figcaption{background:rgba(255,255,255,.7);color:#000;padding:10px;box-sizing:border-box}.gallery{margin-bottom:1.5em}.gallery-item{display:inline-block;text-align:center;vertical-align:top;width:100%}.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}.site-main .gallery{margin-bottom:1.5em}.gallery-item img{vertical-align:bottom}.gallery-icon{padding:5px}embed,iframe,object{max-width:100%}.widget-area .widget{padding:40px}.widget select{max-width:100%}.footer-widgets .widget :last-child,.sidebar .widget :last-child{margin-bottom:0}.widget-title{margin-bottom:30px;font-size:20px;line-height:1.5;font-weight:400;text-transform:none}.widget ol,.widget ul{margin:0}.widget .search-field{width:100%}.widget .search-form{display:flex}.widget .search-form button.search-submit{font-size:15px}.footer-widgets .widget{margin-bottom:30px}.footer-widgets .widget:last-child,.sidebar .widget:last-child{margin-bottom:0}.widget ul li{list-style-type:none;position:relative;margin-bottom:.5em}.widget ul li ul{margin-left:1em;margin-top:.5em}.wp-calendar-table{table-layout:fixed}.site-content{display:flex}.grid-container{margin-left:auto;margin-right:auto;max-width:1200px}.page-header,.sidebar .widget,.site-main>*{margin-bottom:20px}.both-left .inside-left-sidebar,.both-right .inside-left-sidebar{margin-right:10px}.both-left .inside-right-sidebar,.both-right .inside-right-sidebar{margin-left:10px}.one-container.both-right .site-main,.one-container.right-sidebar .site-main{margin-right:40px}.one-container.both-left .site-main,.one-container.left-sidebar .site-main{margin-left:40px}.one-container.both-sidebars .site-main{margin:0 40px 0 40px}.one-container.archive .post:not(:last-child),.one-container.blog .post:not(:last-child){padding-bottom:40px}.one-container .site-content{padding:40px}.separate-containers .comments-area,.separate-containers .inside-article,.separate-containers .page-header,.separate-containers .paging-navigation{padding:40px}.separate-containers .site-main{margin:20px}.separate-containers.no-sidebar .site-main{margin-left:0;margin-right:0}.separate-containers.both-right .site-main,.separate-containers.right-sidebar .site-main{margin-left:0}.separate-containers.both-left .site-main,.separate-containers.left-sidebar .site-main{margin-right:0}.separate-containers .inside-left-sidebar,.separate-containers .inside-right-sidebar{margin-top:20px;margin-bottom:20px}.inside-page-header{padding:40px}.widget-area .main-navigation{margin-bottom:20px}.one-container .site-main>:last-child,.separate-containers .site-main>:last-child{margin-bottom:0}.full-width-content .container.grid-container{max-width:100%}.full-width-content.no-sidebar.separate-containers .site-main{margin:0}.full-width-content.one-container .site-content,.full-width-content.separate-containers .inside-article{padding:0}.full-width-content .entry-content .alignwide{margin-left:0;width:auto;max-width:unset}.contained-content.one-container .site-content,.contained-content.separate-containers .inside-article{padding:0}.sidebar .grid-container{max-width:100%;width:100%}.both-left .is-left-sidebar,.both-sidebars .is-left-sidebar,.left-sidebar .sidebar{order:-10}.both-left .is-right-sidebar{order:-5}.both-right .is-left-sidebar{order:5}.both-right .is-right-sidebar,.both-sidebars .is-right-sidebar{order:10}.inside-site-info{display:flex;align-items:center;justify-content:center;padding:20px 40px}.site-info{text-align:center;font-size:15px}.post-image:not(:first-child){margin-top:2em}.featured-image{line-height:0}.separate-containers .featured-image{margin-top:20px}.separate-containers .inside-article>.featured-image{margin-top:0;margin-bottom:2em}.one-container .inside-article>.featured-image{margin-top:0;margin-bottom:2em}.gp-icon{display:inline-flex;align-self:center}.gp-icon svg{height:1em;width:1em;top:.125em;position:relative;fill:currentColor}.close-search .icon-search svg:nth-child(1),.icon-menu-bars svg:nth-child(2),.icon-search svg:nth-child(2),.toggled .icon-menu-bars svg:nth-child(1){display:none}.close-search .icon-search svg:nth-child(2),.toggled .icon-menu-bars svg:nth-child(2){display:block}.entry-meta .gp-icon{margin-right:.6em;opacity:.7}nav.toggled .icon-arrow-left svg{transform:rotate(-90deg)}nav.toggled .icon-arrow-right svg{transform:rotate(90deg)}nav.toggled .sfHover>a>.dropdown-menu-toggle .gp-icon svg{transform:rotate(180deg)}nav.toggled .sfHover>a>.dropdown-menu-toggle .gp-icon.icon-arrow-left svg{transform:rotate(-270deg)}nav.toggled .sfHover>a>.dropdown-menu-toggle .gp-icon.icon-arrow-right svg{transform:rotate(270deg)}.container.grid-container{width:auto}.menu-toggle,.mobile-bar-items,.sidebar-nav-mobile{display:none}.menu-toggle{padding:0 20px;line-height:60px;margin:0;font-weight:400;text-transform:none;font-size:15px;cursor:pointer}.menu-toggle .mobile-menu{padding-left:3px}.menu-toggle .gp-icon+.mobile-menu{padding-left:9px}.menu-toggle .mobile-menu:empty{display:none}button.menu-toggle{background-color:transparent;flex-grow:1;border:0;text-align:center}button.menu-toggle:active,button.menu-toggle:focus,button.menu-toggle:hover{background-color:transparent}.has-menu-bar-items button.menu-toggle{flex-grow:0}nav.toggled ul ul.sub-menu{width:100%}.toggled .menu-item-has-children .dropdown-menu-toggle{padding-left:20px}.main-navigation.toggled .main-nav{flex-basis:100%;order:3}.main-navigation.toggled .main-nav>ul{display:block}.main-navigation.toggled .main-nav li{width:100%;text-align:left}.main-navigation.toggled .main-nav ul ul{transition:0s;visibility:hidden}.main-navigation.toggled .main-nav ul ul.toggled-on{position:relative;top:0;left:auto!important;right:auto!important;width:100%;pointer-events:auto;height:auto;opacity:1;display:block;visibility:visible;float:none}.main-navigation.toggled .menu-item-has-children .dropdown-menu-toggle{float:right}.mobile-menu-control-wrapper{display:none;margin-left:auto;align-items:center}.has-inline-mobile-toggle #site-navigation.toggled{margin-top:1.5em}.has-inline-mobile-toggle #site-navigation.has-active-search{margin-top:1.5em}.has-inline-mobile-toggle #site-navigation.has-active-search .nav-search-active{position:relative}.has-inline-mobile-toggle #site-navigation.has-active-search .navigation-search input{outline:auto}.nav-float-left .mobile-menu-control-wrapper{order:-10;margin-left:0;margin-right:auto;flex-direction:row-reverse}@media (max-width:768px){.hide-on-mobile{display:none!important}a,body,button,input,select,textarea{transition:all 0s ease-in-out}.inside-header{flex-direction:column;text-align:center}.site-header .header-widget{margin-top:1.5em;margin-left:auto;margin-right:auto;text-align:center}.site-content{flex-direction:column}.container .site-content .content-area{width:auto}.is-left-sidebar.sidebar,.is-right-sidebar.sidebar{width:auto;order:initial}.is-left-sidebar+.is-right-sidebar .inside-right-sidebar{margin-top:0}.both-left .inside-left-sidebar,.both-left .inside-right-sidebar,.both-right .inside-left-sidebar,.both-right .inside-right-sidebar{margin-right:0;margin-left:0}#main{margin-left:0;margin-right:0}body:not(.no-sidebar) #main{margin-bottom:0}.alignleft,.alignright{float:none;display:block;margin-left:auto;margin-right:auto}.comment .children{padding-left:10px;margin-left:0}.entry-meta{font-size:inherit}.entry-meta a{line-height:1.8em}}@media (min-width:769px) and (max-width:1024px){.hide-on-tablet{display:none!important}}@media (min-width:1025px){.hide-on-desktop{display:none!important}} \ No newline at end of file diff --git a/wp-content/themes/generatepress/assets/css/mobile.css b/wp-content/themes/generatepress/assets/css/mobile.css index aa1c1c15..3194c443 100644 --- a/wp-content/themes/generatepress/assets/css/mobile.css +++ b/wp-content/themes/generatepress/assets/css/mobile.css @@ -1,258 +1,258 @@ -/*-------------------------------------------------------------- -# Mobile Menu ---------------------------------------------------------------*/ -.menu-toggle, -.mobile-bar-items, -.sidebar-nav-mobile { - display: none; -} - -.menu-toggle { - padding: 0 20px; - line-height: 60px; - margin: 0; - font-weight: normal; - text-transform: none; - font-size: 15px; - cursor: pointer; -} - -button.menu-toggle { - background-color: transparent; - width: 100%; - border: 0; - text-align: center; -} - -button.menu-toggle:hover, -button.menu-toggle:active, -button.menu-toggle:focus { - background-color: transparent; -} - -.menu-toggle .mobile-menu { - padding-left: 3px; -} - -.menu-toggle .gp-icon + .mobile-menu { - padding-left: 9px; -} - -.menu-toggle .mobile-menu:empty { - display: none; -} - -.nav-search-enabled .main-navigation .menu-toggle { - text-align: left; -} - -.mobile-bar-items { - display: none; - position: absolute; - right: 0; - top: 0; - z-index: 21; - list-style-type: none; -} - -.mobile-bar-items a { - display: inline-block; -} - -nav.toggled ul ul.sub-menu { - width: 100%; -} - -.dropdown-hover .main-navigation.toggled ul li:hover > ul, -.dropdown-hover .main-navigation.toggled ul li.sfHover > ul { - transition-delay: 0s; -} - -.toggled .menu-item-has-children .dropdown-menu-toggle { - padding-left: 20px; -} - -.main-navigation.toggled ul ul { - transition: 0s; - visibility: hidden; -} - -.main-navigation.toggled .main-nav > ul { - display: block; -} - -.main-navigation.toggled .main-nav ul ul.toggled-on { - position: relative; - top: 0; - left: auto !important; - right: auto !important; - width: 100%; - pointer-events: auto; - height: auto; - opacity: 1; - display: block; - visibility: visible; - float: none; -} - -.main-navigation.toggled .main-nav li { - float: none; - clear: both; - display: block; - text-align: left; -} - -.main-navigation.toggled .main-nav li.hide-on-mobile { - display: none !important; -} - -.main-navigation.toggled .menu-item-has-children .dropdown-menu-toggle { - float: right; -} - -.main-navigation.toggled .menu li.search-item { - display: none !important; -} - -.main-navigation.toggled .sf-menu > li.menu-item-float-right { - float: none; - display: inline-block; -} - -/*-------------------------------------------------------------- -# Breakpoint (768px) ---------------------------------------------------------------*/ -@media (max-width: 768px) { - /*-------------------------------------------------------------- - ## Links - --------------------------------------------------------------*/ - a, body, button, input, select, textarea { - transition: all 0s ease-in-out; - } - /*-------------------------------------------------------------- - ## Top Bar - --------------------------------------------------------------*/ - .top-bar.top-bar-align-left, - .top-bar.top-bar-align-right { - text-align: center; - } - .top-bar .widget { - float: none !important; - margin: 0 10px !important; - } - .top-bar .widget_nav_menu li { - float: none; - display: inline-block; - padding: 5px 0; - } - .footer-bar .widget_nav_menu li:first-child { - margin-left: 10px; - } - .footer-bar .widget_nav_menu li:last-child { - margin-right: 10px; - } - /*-------------------------------------------------------------- - ## Header - --------------------------------------------------------------*/ - .inside-header > *:not(:last-child):not(.main-navigation) { - margin-bottom: 20px; - } - .site-header, - .header-aligned-right .site-header { - text-align: center; - } - .header-widget { - float: none; - max-width: 100%; - text-align: center; - } - /*-------------------------------------------------------------- - ## Content Area - --------------------------------------------------------------*/ - .sidebar, - .content-area, - .inside-footer-widgets > div { - float: none; - width: 100%; - left: 0; - right: 0; - } - .site-main { - margin-left: 0 !important; - margin-right: 0 !important; - } - body:not(.no-sidebar) .site-main { - margin-bottom: 0 !important; - } - .one-container .sidebar { - margin-top: 40px; - } - .separate-containers #left-sidebar + #right-sidebar .inside-right-sidebar { - margin-top: 0; - } - .both-right.separate-containers .inside-left-sidebar, - .both-left.separate-containers .inside-left-sidebar, - .both-right.separate-containers .inside-right-sidebar, - .both-left.separate-containers .inside-right-sidebar { - margin-right: 0; - margin-left: 0; - } - .alignleft, - .alignright { - float: none; - display: block; - margin-left: auto; - margin-right: auto; - } - .post-image-aligned-left .post-image, - .post-image-aligned-right .post-image { - float: none; - margin: 2em 0; - text-align: center; - } - .comment .children { - padding-left: 10px; - margin-left: 0; - } - .edd_download { - display: block; - float: none !important; - margin-bottom: 1.5em; - width: 100% !important; - } - .entry-meta { - font-size: inherit; - } - .entry-meta a { - line-height: 1.8em; - } - /*-------------------------------------------------------------- - ## Footer - --------------------------------------------------------------*/ - .site-info { - text-align: center; - } - .copyright-bar { - float: none !important; - text-align: center !important; - } - .footer-bar { - float: none !important; - text-align: center !important; - margin-bottom: 20px; - } - .footer-bar .widget_nav_menu li { - float: none; - display: inline-block; - padding: 5px 0; - } - .inside-footer-widgets > div:not(:last-child) { - margin-bottom: 40px; - } - .site-footer .footer-widgets .footer-widgets-container .inside-footer-widgets { - margin: 0; - } - .site-footer .footer-widgets .footer-widgets-container .inner-padding { - padding: 0; - } -} +/*-------------------------------------------------------------- +# Mobile Menu +--------------------------------------------------------------*/ +.menu-toggle, +.mobile-bar-items, +.sidebar-nav-mobile { + display: none; +} + +.menu-toggle { + padding: 0 20px; + line-height: 60px; + margin: 0; + font-weight: normal; + text-transform: none; + font-size: 15px; + cursor: pointer; +} + +button.menu-toggle { + background-color: transparent; + width: 100%; + border: 0; + text-align: center; +} + +button.menu-toggle:hover, +button.menu-toggle:active, +button.menu-toggle:focus { + background-color: transparent; +} + +.menu-toggle .mobile-menu { + padding-left: 3px; +} + +.menu-toggle .gp-icon + .mobile-menu { + padding-left: 9px; +} + +.menu-toggle .mobile-menu:empty { + display: none; +} + +.nav-search-enabled .main-navigation .menu-toggle { + text-align: left; +} + +.mobile-bar-items { + display: none; + position: absolute; + right: 0; + top: 0; + z-index: 21; + list-style-type: none; +} + +.mobile-bar-items a { + display: inline-block; +} + +nav.toggled ul ul.sub-menu { + width: 100%; +} + +.dropdown-hover .main-navigation.toggled ul li:hover > ul, +.dropdown-hover .main-navigation.toggled ul li.sfHover > ul { + transition-delay: 0s; +} + +.toggled .menu-item-has-children .dropdown-menu-toggle { + padding-left: 20px; +} + +.main-navigation.toggled ul ul { + transition: 0s; + visibility: hidden; +} + +.main-navigation.toggled .main-nav > ul { + display: block; +} + +.main-navigation.toggled .main-nav ul ul.toggled-on { + position: relative; + top: 0; + left: auto !important; + right: auto !important; + width: 100%; + pointer-events: auto; + height: auto; + opacity: 1; + display: block; + visibility: visible; + float: none; +} + +.main-navigation.toggled .main-nav li { + float: none; + clear: both; + display: block; + text-align: left; +} + +.main-navigation.toggled .main-nav li.hide-on-mobile { + display: none !important; +} + +.main-navigation.toggled .menu-item-has-children .dropdown-menu-toggle { + float: right; +} + +.main-navigation.toggled .menu li.search-item { + display: none !important; +} + +.main-navigation.toggled .sf-menu > li.menu-item-float-right { + float: none; + display: inline-block; +} + +/*-------------------------------------------------------------- +# Breakpoint (768px) +--------------------------------------------------------------*/ +@media (max-width: 768px) { + /*-------------------------------------------------------------- + ## Links + --------------------------------------------------------------*/ + a, body, button, input, select, textarea { + transition: all 0s ease-in-out; + } + /*-------------------------------------------------------------- + ## Top Bar + --------------------------------------------------------------*/ + .top-bar.top-bar-align-left, + .top-bar.top-bar-align-right { + text-align: center; + } + .top-bar .widget { + float: none !important; + margin: 0 10px !important; + } + .top-bar .widget_nav_menu li { + float: none; + display: inline-block; + padding: 5px 0; + } + .footer-bar .widget_nav_menu li:first-child { + margin-left: 10px; + } + .footer-bar .widget_nav_menu li:last-child { + margin-right: 10px; + } + /*-------------------------------------------------------------- + ## Header + --------------------------------------------------------------*/ + .inside-header > *:not(:last-child):not(.main-navigation) { + margin-bottom: 20px; + } + .site-header, + .header-aligned-right .site-header { + text-align: center; + } + .header-widget { + float: none; + max-width: 100%; + text-align: center; + } + /*-------------------------------------------------------------- + ## Content Area + --------------------------------------------------------------*/ + .sidebar, + .content-area, + .inside-footer-widgets > div { + float: none; + width: 100%; + left: 0; + right: 0; + } + .site-main { + margin-left: 0 !important; + margin-right: 0 !important; + } + body:not(.no-sidebar) .site-main { + margin-bottom: 0 !important; + } + .one-container .sidebar { + margin-top: 40px; + } + .separate-containers #left-sidebar + #right-sidebar .inside-right-sidebar { + margin-top: 0; + } + .both-right.separate-containers .inside-left-sidebar, + .both-left.separate-containers .inside-left-sidebar, + .both-right.separate-containers .inside-right-sidebar, + .both-left.separate-containers .inside-right-sidebar { + margin-right: 0; + margin-left: 0; + } + .alignleft, + .alignright { + float: none; + display: block; + margin-left: auto; + margin-right: auto; + } + .post-image-aligned-left .post-image, + .post-image-aligned-right .post-image { + float: none; + margin: 2em 0; + text-align: center; + } + .comment .children { + padding-left: 10px; + margin-left: 0; + } + .edd_download { + display: block; + float: none !important; + margin-bottom: 1.5em; + width: 100% !important; + } + .entry-meta { + font-size: inherit; + } + .entry-meta a { + line-height: 1.8em; + } + /*-------------------------------------------------------------- + ## Footer + --------------------------------------------------------------*/ + .site-info { + text-align: center; + } + .copyright-bar { + float: none !important; + text-align: center !important; + } + .footer-bar { + float: none !important; + text-align: center !important; + margin-bottom: 20px; + } + .footer-bar .widget_nav_menu li { + float: none; + display: inline-block; + padding: 5px 0; + } + .inside-footer-widgets > div:not(:last-child) { + margin-bottom: 40px; + } + .site-footer .footer-widgets .footer-widgets-container .inside-footer-widgets { + margin: 0; + } + .site-footer .footer-widgets .footer-widgets-container .inner-padding { + padding: 0; + } +} diff --git a/wp-content/themes/generatepress/assets/css/style.css b/wp-content/themes/generatepress/assets/css/style.css index e15b1407..a629962d 100644 --- a/wp-content/themes/generatepress/assets/css/style.css +++ b/wp-content/themes/generatepress/assets/css/style.css @@ -1,1849 +1,1848 @@ -/*-------------------------------------------------------------- ->>> TABLE OF CONTENTS: ----------------------------------------------------------------- -# Reset -# Elements -# Forms -# Links -# Alignments -# Accessibility -# Clearings -# Navigation - # Mobile Menu - # Navigation Search - # Dropdown Menus - # Sidebar Navigation - # Navigation Layout -# Post Navigation -# Header -# Post Content -# Widgets -# Content Layout -# Footer -# Featured Images -# Top Bar -# Icons -# Compatibility ---------------------------------------------------------------*/ -/*-------------------------------------------------------------- -# Reset ---------------------------------------------------------------*/ -html, -body, -div, -span, -applet, -object, -iframe, -h1, -h2, -h3, -h4, -h5, -h6, -p, -blockquote, -pre, -a, -abbr, -acronym, -address, -big, -cite, -code, -del, -dfn, -em, -font, -ins, -kbd, -q, -s, -samp, -small, -strike, -strong, -sub, -sup, -tt, -var, -dl, -dt, -dd, -ol, -ul, -li, -fieldset, -form, -label, -legend, -table, -caption, -tbody, -tfoot, -thead, -tr, -th, -td { - border: 0; - margin: 0; - padding: 0; -} - -html { - font-family: sans-serif; - -webkit-text-size-adjust: 100%; - -ms-text-size-adjust: 100%; -} - -article, -aside, -details, -figcaption, -figure, -footer, -header, -main, -nav, -section { - display: block; -} - -audio, -canvas, -progress, -video { - display: inline-block; - vertical-align: baseline; -} - -audio:not([controls]) { - display: none; - height: 0; -} - -[hidden], -template { - display: none; -} - -ol, -ul { - list-style: none; -} - -table { - /* tables still need 'cellspacing="0"' in the markup */ - border-collapse: separate; - border-spacing: 0; -} - -caption, -th, -td { - font-weight: normal; - text-align: left; - padding: 5px; -} - -blockquote:before, -blockquote:after, -q:before, -q:after { - content: ""; -} - -a { - background-color: transparent; -} - -a img { - border: 0; -} - -/*-------------------------------------------------------------- -# Elements ---------------------------------------------------------------*/ -body, -button, -input, -select, -textarea { - font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; - font-weight: normal; - text-transform: none; - font-size: 17px; - line-height: 1.5; -} - -p { - margin-bottom: 1.5em; -} - -h1, -h2, -h3, -h4, -h5, -h6 { - font-family: inherit; - font-size: 100%; - font-style: inherit; - font-weight: inherit; -} - -pre { - background: rgba(0, 0, 0, 0.05); - font-family: inherit; - font-size: inherit; - line-height: normal; - margin-bottom: 1.5em; - padding: 20px; - overflow: auto; - max-width: 100%; -} - -blockquote { - border-left: 5px solid rgba(0, 0, 0, 0.05); - padding: 20px; - font-size: 1.2em; - font-style: italic; - margin: 0 0 1.5em; - position: relative; -} - -blockquote p:last-child { - margin: 0; -} - -table, -th, -td { - border: 1px solid rgba(0, 0, 0, 0.1); -} - -table { - border-collapse: separate; - border-spacing: 0; - border-width: 1px 0 0 1px; - margin: 0 0 1.5em; - width: 100%; -} - -th, -td { - padding: 8px; -} - -th { - border-width: 0 1px 1px 0; -} - -td { - border-width: 0 1px 1px 0; -} - -hr { - background-color: rgba(0, 0, 0, 0.1); - border: 0; - height: 1px; - margin-bottom: 40px; - margin-top: 40px; -} - -fieldset { - padding: 0; - border: 0; - min-width: inherit; -} - -fieldset legend { - padding: 0; - margin-bottom: 1.5em; -} - -h1 { - font-size: 42px; - margin-bottom: 20px; - line-height: 1.2em; - font-weight: normal; - text-transform: none; -} - -h2 { - font-size: 35px; - margin-bottom: 20px; - line-height: 1.2em; - font-weight: normal; - text-transform: none; -} - -h3 { - font-size: 29px; - margin-bottom: 20px; - line-height: 1.2em; - font-weight: normal; - text-transform: none; -} - -h4 { - font-size: 24px; -} - -h5 { - font-size: 20px; -} - -h4, -h5, -h6 { - margin-bottom: 20px; -} - -ul, -ol { - margin: 0 0 1.5em 3em; -} - -ul { - list-style: disc; -} - -ol { - list-style: decimal; -} - -li > ul, -li > ol { - margin-bottom: 0; - margin-left: 1.5em; -} - -dt { - font-weight: bold; -} - -dd { - margin: 0 1.5em 1.5em; -} - -b, -strong { - font-weight: bold; -} - -dfn, -cite, -em, -i { - font-style: italic; -} - -address { - margin: 0 0 1.5em; -} - -code, -kbd, -tt, -var { - font: 15px Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace; -} - -abbr, -acronym { - border-bottom: 1px dotted #666; - cursor: help; -} - -mark, -ins { - text-decoration: none; -} - -sup, -sub { - font-size: 75%; - height: 0; - line-height: 0; - position: relative; - vertical-align: baseline; -} - -sup { - bottom: 1ex; -} - -sub { - top: .5ex; -} - -small { - font-size: 75%; -} - -big { - font-size: 125%; -} - -figure { - margin: 0; -} - -table { - margin: 0 0 1.5em; - width: 100%; -} - -th { - font-weight: bold; -} - -img { - height: auto; - /* Make sure images are scaled correctly. */ - max-width: 100%; - /* Adhere to container width. */ -} - -/*-------------------------------------------------------------- -# 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: baseline; - /* Improves appearance and consistency in all browsers */ - *vertical-align: middle; - /* Improves appearance and consistency in all browsers */ -} - -button, -html input[type="button"], -input[type="reset"], -input[type="submit"] { - border: 1px solid transparent; - background: #55555e; - cursor: pointer; - /* Improves usability and consistency of cursor style between image-type 'input' and others */ - -webkit-appearance: button; - /* Corrects inability to style clickable 'input' types in iOS */ - padding: 10px 20px; - color: #FFF; -} - -input[type="checkbox"], -input[type="radio"] { - box-sizing: border-box; - /* Addresses box sizing set to content-box in IE8/9 */ - padding: 0; - /* Addresses excess padding in IE8/9 */ -} - -input[type="search"] { - -webkit-appearance: textfield; - /* Addresses appearance set to searchfield in S5, Chrome */ - box-sizing: content-box; -} - -input[type="search"]::-webkit-search-decoration { - /* Corrects inner padding displayed oddly in S5, Chrome on OSX */ - -webkit-appearance: none; -} - -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"], -input[type="tel"], -input[type="number"], -textarea, -select { - background: #FAFAFA; - color: #666; - border: 1px solid #ccc; - border-radius: 0px; - padding: 10px 15px; - box-sizing: border-box; - max-width: 100%; -} - -textarea { - overflow: auto; - /* Removes default vertical scrollbar in IE6/7/8/9 */ - vertical-align: top; - /* Improves readability and alignment in all browsers */ - width: 100%; -} - -input[type="file"] { - max-width: 100%; - box-sizing: border-box; -} - -/*-------------------------------------------------------------- -# Links ---------------------------------------------------------------*/ -a, -button, -input { - transition: color 0.1s ease-in-out, background-color 0.1s ease-in-out; -} - -a, -a:visited, -a:hover, -a:focus { - text-decoration: none; -} - -.button, -.wp-block-button .wp-block-button__link { - padding: 10px 20px; - display: inline-block; -} - -.wp-block-button .wp-block-button__link { - font-size: inherit; - line-height: inherit; -} - -.using-mouse :focus { - outline: 0; -} - -.using-mouse ::-moz-focus-inner { - border: 0; -} - -/*-------------------------------------------------------------- -# Alignments ---------------------------------------------------------------*/ -.alignleft { - float: left; - margin-right: 1.5em; -} - -.alignright { - float: right; - margin-left: 1.5em; -} - -.aligncenter { - clear: both; - display: block; - margin: 0 auto; -} - -.size-auto, -.size-full, -.size-large, -.size-medium, -.size-thumbnail { - max-width: 100%; - height: auto; -} - -.no-sidebar .entry-content .alignfull { - margin-left: calc( -100vw / 2 + 100% / 2); - margin-right: calc( -100vw / 2 + 100% / 2); - max-width: 100vw; - width: auto; -} - -/*-------------------------------------------------------------- -# Accessibility ---------------------------------------------------------------*/ -.screen-reader-text { - border: 0; - clip: rect(1px, 1px, 1px, 1px); - -webkit-clip-path: inset(50%); - clip-path: inset(50%); - height: 1px; - margin: -1px; - overflow: hidden; - padding: 0; - position: absolute !important; - width: 1px; - word-wrap: normal !important; -} - -.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; - -webkit-clip-path: none; - clip-path: none; - color: #21759b; - display: block; - font-size: 0.875rem; - font-weight: 700; - height: auto; - left: 5px; - line-height: normal; - padding: 15px 23px 14px; - text-decoration: none; - top: 5px; - width: auto; - z-index: 100000; -} - -/* Do not show the outline on the skip link target. */ -#primary[tabindex="-1"]:focus { - outline: 0; -} - -/*-------------------------------------------------------------- -# Clearings ---------------------------------------------------------------*/ -.clear:after, -.entry-content:after, -.comment-content:after, -.site-header:after, -.site-content:after, -.paging-navigation:after, -.site-footer:after, -.site-info:after, -.page-header-content-container:after, -.inside-navigation:not(.grid-container):after, -.inside-header:not(.grid-container):after, -.inside-top-bar:not(.grid-container):after, -.inside-footer-widgets:not(.grid-container):after { - content: ""; - display: table; - clear: both; -} - -/*-------------------------------------------------------------- -# Navigation ---------------------------------------------------------------*/ -.main-navigation { - z-index: 100; - padding: 0; - clear: both; - display: block; -} - -.main-navigation a { - display: block; - text-decoration: none; - font-weight: normal; - text-transform: none; - font-size: 15px; -} - -.main-navigation ul { - list-style: none; - margin: 0; - padding-left: 0; -} - -.main-navigation .main-nav ul li a { - padding-left: 20px; - padding-right: 20px; - line-height: 60px; -} - -.inside-navigation { - position: relative; -} - -.main-navigation li { - float: left; - position: relative; -} - -.sf-menu > li.menu-item-float-right { - float: right !important; -} - -.nav-float-right .inside-header .main-navigation { - float: right; - clear: right; -} - -.nav-float-left .inside-header .main-navigation { - float: left; - clear: left; -} - -.nav-aligned-right .main-navigation:not(.toggled) .menu > li, -.nav-aligned-center .main-navigation:not(.toggled) .menu > li { - float: none; - display: inline-block; -} - -.nav-aligned-right .main-navigation:not(.toggled) ul, -.nav-aligned-center .main-navigation:not(.toggled) ul { - letter-spacing: -0.31em; - font-size: 1em; -} - -.nav-aligned-right .main-navigation:not(.toggled) ul li, -.nav-aligned-center .main-navigation:not(.toggled) ul li { - letter-spacing: normal; -} - -.nav-aligned-center .main-navigation { - text-align: center; -} - -.nav-aligned-right .main-navigation { - text-align: right; -} - -.main-navigation li.search-item { - float: right; -} - -.main-navigation .mobile-bar-items a { - padding-left: 20px; - padding-right: 20px; - line-height: 60px; -} - -/*-------------------------------------------------------------- -## Dropdown Menus ---------------------------------------------------------------*/ -.main-navigation ul ul { - display: block; - box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.1); - float: left; - position: absolute; - left: -99999px; - opacity: 0; - z-index: 99999; - width: 200px; - text-align: left; - top: auto; - transition: opacity 80ms linear; - transition-delay: 0s; - pointer-events: none; - height: 0; - overflow: hidden; -} - -.main-navigation ul ul a { - display: block; -} - -.main-navigation ul ul li { - width: 100%; -} - -.main-navigation .main-nav ul ul li a { - line-height: normal; - padding: 10px 20px; - font-size: 14px; -} - -.main-navigation .main-nav ul li.menu-item-has-children > a { - padding-right: 0; - position: relative; -} - -.main-navigation.sub-menu-left .sub-menu { - right: 0; -} - -.main-navigation:not(.toggled) ul li:hover > ul, -.main-navigation:not(.toggled) ul li.sfHover > ul { - left: auto; - opacity: 1; - transition-delay: 150ms; - pointer-events: auto; - height: auto; - overflow: visible; -} - -.main-navigation:not(.toggled) ul ul li:hover > ul, -.main-navigation:not(.toggled) ul ul li.sfHover > ul { - left: 100%; - top: 0; -} - -.main-navigation.sub-menu-left:not(.toggled) ul ul li:hover > ul, -.main-navigation.sub-menu-left:not(.toggled) ul ul li.sfHover > ul { - right: 100%; - left: auto; -} - -.nav-float-right .main-navigation ul ul ul { - top: 0; -} - -.menu-item-has-children .dropdown-menu-toggle { - display: inline-block; - height: 100%; - clear: both; - padding-right: 20px; - padding-left: 10px; -} - -.menu-item-has-children ul .dropdown-menu-toggle { - padding-top: 10px; - padding-bottom: 10px; - margin-top: -10px; -} - -nav ul ul .menu-item-has-children .dropdown-menu-toggle, -.sidebar .menu-item-has-children .dropdown-menu-toggle { - float: right; -} - -/*-------------------------------------------------------------- -## Sidebar Navigation ---------------------------------------------------------------*/ -.widget-area .main-navigation li { - float: none; - display: block; - width: 100%; - padding: 0; - margin: 0; -} - -.sidebar .main-navigation.sub-menu-right ul li:hover ul, -.sidebar .main-navigation.sub-menu-right ul li.sfHover ul { - top: 0; - left: 100%; -} - -.sidebar .main-navigation.sub-menu-left ul li:hover ul, -.sidebar .main-navigation.sub-menu-left ul li.sfHover ul { - top: 0; - right: 100%; -} - -/*-------------------------------------------------------------- -# Post Navigation ---------------------------------------------------------------*/ -.site-main .comment-navigation, -.site-main .posts-navigation, -.site-main .post-navigation { - margin: 0 0 2em; - overflow: hidden; -} - -.site-main .post-navigation { - margin-bottom: 0; -} - -.paging-navigation .nav-previous, -.paging-navigation .nav-next { - display: none; -} - -.paging-navigation .nav-links > * { - padding: 0 5px; -} - -.paging-navigation .nav-links .current { - font-weight: bold; -} - -/* Less specific so we don't overwrite existing customizations. */ -.nav-links > *:first-child { - padding-left: 0; -} - -/*-------------------------------------------------------------- -# Header ---------------------------------------------------------------*/ -.site-header { - position: relative; -} - -.inside-header { - padding: 20px 40px; -} - -.main-title { - margin: 0; - font-size: 25px; - line-height: 1.2em; - word-wrap: break-word; - font-weight: bold; - text-transform: none; -} - -.site-description { - margin: 0; - line-height: 1.5; - font-weight: normal; - text-transform: none; - font-size: 15px; -} - -.site-logo { - display: inline-block; - max-width: 100%; -} - -.site-header .header-image { - vertical-align: middle; -} - -.header-widget { - float: right; - overflow: hidden; - max-width: 50%; -} - -.header-widget .widget { - padding: 0 0 20px; - margin-bottom: 0; -} - -.header-widget .widget:last-child { - padding-bottom: 0; -} - -.header-widget .widget-title { - margin-bottom: 15px; -} - -.nav-float-right .header-widget { - position: relative; - top: -10px; -} - -.nav-float-right .header-widget .widget { - padding: 0 0 10px; -} - -.nav-float-left .inside-header .site-branding, -.nav-float-left .inside-header .site-logo { - float: right; - clear: right; -} - -.nav-float-left .inside-header:after { - clear: both; - content: ''; - display: table; -} - -.nav-float-right .inside-header .site-branding { - display: inline-block; -} - -.site-branding-container { - display: inline-flex; - align-items: center; - text-align: left; -} - -.site-branding-container .site-logo { - margin-right: 1.5em; -} - -.header-aligned-center .site-header { - text-align: center; -} - -.header-aligned-right .site-header { - text-align: right; -} - -.header-aligned-right .site-branding-container { - text-align: right; -} - -.header-aligned-right .site-branding-container .site-logo { - order: 10; - margin-right: 0; - margin-left: 1.5em; -} - -/*-------------------------------------------------------------- -# Post Content ---------------------------------------------------------------*/ -.sticky { - display: block; -} - -.posted-on .updated, -.entry-header .gp-icon { - display: none; -} - -.byline, -.single .byline, -.group-blog .byline, -.entry-header .cat-links, -.entry-header .tags-links, -.entry-header .comments-link { - display: inline; -} - -footer.entry-meta .byline, -footer.entry-meta .posted-on { - display: block; -} - -.page-content:not(:first-child), -.entry-content:not(:first-child), -.entry-summary:not(:first-child) { - margin-top: 2em; -} - -.page-links { - clear: both; - margin: 0 0 1.5em; -} - -.blog .format-status .entry-title, -.archive .format-status .entry-title, -.blog .format-aside .entry-header, -.archive .format-aside .entry-header, -.blog .format-status .entry-header, -.archive .format-status .entry-header, -.blog .format-status .entry-meta, -.archive .format-status .entry-meta { - display: none; -} - -.blog .format-aside .entry-content, -.archive .format-aside .entry-content, -.blog .format-status .entry-content, -.archive .format-status .entry-content { - margin-top: 0; -} - -.blog .format-status .entry-content p:last-child, -.archive .format-status .entry-content p:last-child { - margin-bottom: 0; -} - -.site-content, -.entry-header { - word-wrap: break-word; -} - -.entry-title { - margin-bottom: 0; -} - -.author .page-header .page-title { - display: flex; - align-items: center; -} - -.author .page-header .avatar { - margin-right: 20px; -} - -.page-header > *:last-child, -.page-header .author-info > *:last-child { - margin-bottom: 0; -} - -.entry-meta { - font-size: 85%; - margin-top: .5em; - line-height: 1.5; -} - -footer.entry-meta { - margin-top: 2em; -} - -.cat-links, -.tags-links, -.comments-link { - display: block; -} - -.taxonomy-description p:last-child, -.read-more-container, -.page-content > p:last-child, -.entry-content > p:last-child, -.entry-summary > p:last-child { - margin-bottom: 0; -} - -/*-------------------------------------------------------------- -# Media ---------------------------------------------------------------*/ -/*-------------------------------------------------------------- -## Captions ---------------------------------------------------------------*/ -.wp-caption { - margin-bottom: 1.5em; - max-width: 100%; - position: relative; -} - -.wp-caption img[class*="wp-image-"] { - display: block; - margin: 0 auto 0; - max-width: 100%; -} - -.wp-caption .wp-caption-text { - font-size: 75%; - padding-top: 5px; - opacity: 0.8; -} - -.wp-caption img { - position: relative; - vertical-align: bottom; -} - -.wp-block-image figcaption { - font-size: 13px; - text-align: center; -} - -/*-------------------------------------------------------------- -## Galleries ---------------------------------------------------------------*/ -.wp-block-gallery, -ul.blocks-gallery-grid { - margin-left: 0; -} - -.wp-block-gallery .blocks-gallery-image figcaption, -.wp-block-gallery .blocks-gallery-item figcaption { - background: rgba(255, 255, 255, 0.7); - color: #000; - padding: 10px; - box-sizing: border-box; -} - -.gallery { - margin-bottom: 1.5em; -} - -.gallery-item { - display: inline-block; - text-align: center; - vertical-align: top; - width: 100%; -} - -.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; -} - -.site-main .gallery { - margin-bottom: 1.5em; -} - -.gallery-item img { - vertical-align: bottom; -} - -.gallery-icon { - padding: 5px; -} - -embed, -iframe, -object { - max-width: 100%; -} - -/*-------------------------------------------------------------- -# Comments ---------------------------------------------------------------*/ -.comment-content a { - word-wrap: break-word; -} - -.bypostauthor { - display: block; -} - -.comment, -.comment-list { - list-style-type: none; - padding: 0; - margin: 0; -} - -.comment-author-info { - display: inline-block; - vertical-align: middle; -} - -.comment-meta .avatar { - float: left; - margin-right: 10px; - border-radius: 50%; -} - -.comment-author cite { - font-style: normal; - font-weight: bold; -} - -.entry-meta.comment-metadata { - margin-top: 0; -} - -.comment-content { - margin-top: 1.5em; -} - -.comment-respond { - margin-top: 0; -} - -.comment-form > .form-submit { - margin-bottom: 0; -} - -.comment-form input, -.comment-form-comment { - margin-bottom: 10px; -} - -.comment-form #author, -.comment-form #email, -.comment-form #url { - display: block; -} - -.comment-metadata .edit-link:before { - display: none; -} - -.comment-body { - padding: 30px 0; -} - -.comment-content { - padding: 30px; - border: 1px solid rgba(0, 0, 0, 0.05); -} - -.depth-1.parent > .children { - border-bottom: 1px solid rgba(0, 0, 0, 0.05); -} - -.comment .children { - padding-left: 30px; - margin-top: -30px; - border-left: 1px solid rgba(0, 0, 0, 0.05); -} - -.pingback .comment-body, -.trackback .comment-body { - border-bottom: 1px solid rgba(0, 0, 0, 0.05); -} - -.pingback .edit-link { - font-size: 13px; -} - -.comment-content p:last-child { - margin-bottom: 0; -} - -.comment-list > .comment:first-child { - padding-top: 0; - margin-top: 0; - border-top: 0; -} - -ol.comment-list { - margin-bottom: 1.5em; -} - -.comment-form-cookies-consent { - display: flex; - align-items: center; -} - -.comment-form-cookies-consent input { - margin-right: 0.5em; - margin-bottom: 0; -} - -.one-container .comments-area { - margin-top: 1.5em; -} - -.comment-content .reply { - font-size: 85%; -} - -#cancel-comment-reply-link { - padding-left: 10px; -} - -/*-------------------------------------------------------------- -# Widgets ---------------------------------------------------------------*/ -.widget-area .widget { - padding: 40px; -} - -.widget select { - max-width: 100%; -} - -.sidebar .widget *:last-child, -.footer-widgets .widget *:last-child { - margin-bottom: 0; -} - -.widget-title { - margin-bottom: 30px; - font-size: 20px; - line-height: 1.5; - font-weight: normal; - text-transform: none; -} - -.widget ul, -.widget ol { - margin: 0; -} - -.widget .search-field { - width: 100%; -} - -.widget_search .search-submit { - display: none; -} - -.widget { - margin: 0 0 30px; - box-sizing: border-box; -} - -.widget:last-child, -.separate-containers .widget:last-child { - margin-bottom: 0; -} - -.sidebar .widget, -.footer-widgets .widget { - font-size: 17px; -} - -.widget ul li { - list-style-type: none; - position: relative; - padding-bottom: 5px; -} - -.widget_categories .children { - margin-left: 1.5em; - padding-top: 5px; -} - -.widget_categories .children li:last-child { - padding-bottom: 0; -} - -.widget_nav_menu ul ul, -.widget_pages ul ul { - margin-left: 1em; - margin-top: 5px; -} - -.widget ul li.menu-item-has-children, -.widget ul li.page_item_has_children { - padding-bottom: 0; -} - -#wp-calendar { - table-layout: fixed; - font-size: 80%; -} - -#wp-calendar #prev, -#wp-calendar #prev + .pad { - border-right: 0; -} - -.sidebar .grid-container { - max-width: 100%; - width: 100%; -} - -/*-------------------------------------------------------------- -# Content Layout ---------------------------------------------------------------*/ -.post { - margin: 0 0 2em; -} - -.page-header { - margin-bottom: 30px; -} - -/*-------------------------------------------------------------- -## One Container ---------------------------------------------------------------*/ -.one-container.both-left .inside-left-sidebar, -.one-container.both-right .inside-left-sidebar { - margin-right: 20px; -} - -.one-container.both-left .inside-right-sidebar, -.one-container.both-right .inside-right-sidebar { - margin-left: 20px; -} - -.one-container:not(.page) .inside-article { - padding: 0 0 30px 0; -} - -.one-container.right-sidebar .site-main, -.one-container.both-right .site-main { - margin-right: 40px; -} - -.one-container.left-sidebar .site-main, -.one-container.both-left .site-main { - margin-left: 40px; -} - -.one-container.both-sidebars .site-main { - margin: 0px 40px 0px 40px; -} - -.one-container .site-content { - padding: 40px; -} - -/*-------------------------------------------------------------- -## Separate Containers ---------------------------------------------------------------*/ -.separate-containers .inside-article, -.separate-containers .comments-area, -.separate-containers .page-header, -.separate-containers .paging-navigation { - padding: 40px; -} - -.separate-containers .widget, -.separate-containers .site-main > *, -.separate-containers .page-header { - margin-bottom: 20px; -} - -.separate-containers .site-main { - margin: 20px; -} - -.separate-containers.no-sidebar .site-main { - margin-left: 0; - margin-right: 0; -} - -.separate-containers.right-sidebar .site-main, -.separate-containers.both-right .site-main { - margin-left: 0; -} - -.separate-containers.left-sidebar .site-main, -.separate-containers.both-left .site-main { - margin-right: 0; -} - -.separate-containers.both-right .inside-left-sidebar, -.separate-containers.both-left .inside-left-sidebar { - margin-right: 10px; -} - -.separate-containers.both-right .inside-right-sidebar, -.separate-containers.both-left .inside-right-sidebar { - margin-left: 10px; -} - -.separate-containers .inside-right-sidebar, -.separate-containers .inside-left-sidebar { - margin-top: 20px; - margin-bottom: 20px; -} - -.inside-page-header, -.wp-block-group__inner-container { - padding: 40px; -} - -.widget-area .main-navigation { - margin-bottom: 20px; -} - -.separate-containers .site-main > *:last-child, -.one-container .site-main > *:last-child { - margin-bottom: 0; -} - -/*-------------------------------------------------------------- -## Full Width Content ---------------------------------------------------------------*/ -.full-width-content .container.grid-container { - max-width: 100%; -} - -.full-width-content.no-sidebar.separate-containers .site-main { - margin: 0; -} - -.full-width-content.separate-containers .inside-article, -.full-width-content.one-container .site-content { - padding: 0; -} - -.full-width-content .entry-content .alignwide { - margin-left: 0; - width: auto; - max-width: unset; -} - -/*-------------------------------------------------------------- -## Contained Content ---------------------------------------------------------------*/ -.contained-content.separate-containers .inside-article, -.contained-content.one-container .site-content { - padding: 0; -} - -/*-------------------------------------------------------------- -# Footer ---------------------------------------------------------------*/ -.site-info { - text-align: center; - font-size: 15px; -} - -.site-info { - padding: 20px 40px; -} - -.footer-widgets { - padding: 40px; -} - -.site-footer .footer-widgets-container .inner-padding { - padding: 0px 0px 0px 40px; -} - -.site-footer .footer-widgets-container .inside-footer-widgets { - margin-left: -40px; -} - -/*-------------------------------------------------------------- -## Footer Bar ---------------------------------------------------------------*/ -.footer-bar-active .footer-bar .widget { - padding: 0; -} - -.footer-bar .widget_nav_menu > div > ul { - display: inline-block; - vertical-align: top; -} - -.footer-bar .widget_nav_menu li { - margin: 0 10px; - float: left; - padding: 0; -} - -.footer-bar .widget_nav_menu li:first-child { - margin-left: 0; -} - -.footer-bar .widget_nav_menu li:last-child { - margin-right: 0; -} - -.footer-bar .widget_nav_menu li ul { - display: none; -} - -.footer-bar .textwidget p:last-child { - margin: 0; -} - -.footer-bar .widget-title { - display: none; -} - -.footer-bar-align-right .copyright-bar { - float: left; -} - -.footer-bar-align-right .footer-bar { - float: right; - text-align: right; -} - -.footer-bar-align-left .copyright-bar { - float: right; - text-align: right; -} - -.footer-bar-align-left .footer-bar { - float: left; - text-align: left; -} - -.footer-bar-align-center .copyright-bar { - float: none; - text-align: center; -} - -.footer-bar-align-center .footer-bar { - float: none; - text-align: center; - margin-bottom: 10px; -} - -/*-------------------------------------------------------------- -# Featured Images ---------------------------------------------------------------*/ -.post-image:not(:first-child) { - margin-top: 2em; -} - -.page-header-image, -.page-header-image-single { - line-height: 0; - /* no more weird spacing */ -} - -.separate-containers .inside-article > [class*="page-header-"], -.one-container .inside-article > [class*="page-header-"] { - margin-bottom: 2em; - margin-top: 0; -} - -.inside-article .page-header-image-single.page-header-below-title { - margin-top: 2em; -} - -.separate-containers .page-header-image, -.separate-containers .page-header-contained, -.separate-containers .page-header-content, -.separate-containers .page-header-image-single, -.separate-containers .page-header-content-single { - margin-top: 20px; -} - -/*-------------------------------------------------------------- -# Top Bar ---------------------------------------------------------------*/ -.top-bar { - font-weight: normal; - text-transform: none; - font-size: 13px; -} - -.top-bar .inside-top-bar .widget { - padding: 0; - display: inline-block; - margin: 0; -} - -.top-bar .inside-top-bar .textwidget p:last-child { - margin: 0; -} - -.top-bar .widget-title { - display: none; -} - -.top-bar .widget_nav_menu li { - margin: 0 10px; - float: left; - padding: 0; -} - -.top-bar .widget_nav_menu li:first-child { - margin-left: 0; -} - -.top-bar .widget_nav_menu li:last-child { - margin-right: 0; -} - -.top-bar .widget_nav_menu li ul { - display: none; -} - -.top-bar .widget_nav_menu > div > ul { - display: inline-block; - vertical-align: top; -} - -.inside-top-bar { - padding: 10px 40px; -} - -.top-bar-align-center { - text-align: center; -} - -.top-bar-align-center .inside-top-bar .widget:not(:first-child) { - margin-left: 10px; -} - -.top-bar-align-center .inside-top-bar .widget:first-child:last-child { - display: block; -} - -.top-bar-align-right { - text-align: right; -} - -.top-bar-align-right .inside-top-bar > .widget:nth-child(even) { - float: left; - margin-right: 10px; -} - -.top-bar-align-right .inside-top-bar > .widget:nth-child(odd) { - margin-left: 10px; -} - -.top-bar-align-left .inside-top-bar > .widget:nth-child(odd) { - float: left; - margin-right: 10px; -} - -.top-bar-align-left .inside-top-bar > .widget:nth-child(even) { - margin-left: 10px; - float: right; -} - -/*-------------------------------------------------------------- -# Icons ---------------------------------------------------------------*/ -.gp-icon { - display: inline-flex; - align-self: center; -} - -.gp-icon svg { - height: 1em; - width: 1em; - top: .125em; - position: relative; - fill: currentColor; -} - -.icon-menu-bars svg:nth-child(2), -.toggled .icon-menu-bars svg:nth-child(1), -.icon-search svg:nth-child(2), -.close-search .icon-search svg:nth-child(1) { - display: none; -} - -.toggled .icon-menu-bars svg:nth-child(2), -.close-search .icon-search svg:nth-child(2) { - display: block; -} - -.entry-meta .gp-icon { - margin-right: 0.6em; - opacity: 0.7; -} - -nav.toggled .icon-arrow-left svg { - transform: rotate(-90deg); -} - -nav.toggled .icon-arrow-right svg { - transform: rotate(90deg); -} - -nav.toggled .sfHover > a > .dropdown-menu-toggle .gp-icon svg { - transform: rotate(180deg); -} - -nav.toggled .sfHover > a > .dropdown-menu-toggle .gp-icon.icon-arrow-left svg { - transform: rotate(-270deg); -} - -nav.toggled .sfHover > a > .dropdown-menu-toggle .gp-icon.icon-arrow-right svg { - transform: rotate(270deg); -} - -/*-------------------------------------------------------------- -# Compatibility ---------------------------------------------------------------*/ -/* Bootstrap fix */ -.container.grid-container { - width: auto; -} - -/* Globally hidden elements when Infinite Scroll is supported and in use. */ -.infinite-scroll .paging-navigation, -.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; -} - -/* SiteOrigin Page Builder */ -.so-panel.widget { - padding: 0; -} - -/* MailChimp CSS */ -#mc_embed_signup .clear { - display: block; - height: auto; - visibility: visible; - width: auto; -} +/*-------------------------------------------------------------- +>>> TABLE OF CONTENTS: +---------------------------------------------------------------- +# Reset +# Elements +# Forms +# Links +# Alignments +# Accessibility +# Clearings +# Navigation + # Mobile Menu + # Navigation Search + # Dropdown Menus + # Sidebar Navigation + # Navigation Layout +# Post Navigation +# Header +# Post Content +# Widgets +# Content Layout +# Footer +# Featured Images +# Top Bar +# Icons +# Compatibility +--------------------------------------------------------------*/ +/*-------------------------------------------------------------- +# Reset +--------------------------------------------------------------*/ +html, +body, +div, +span, +applet, +object, +iframe, +h1, +h2, +h3, +h4, +h5, +h6, +p, +blockquote, +pre, +a, +abbr, +acronym, +address, +big, +cite, +code, +del, +dfn, +em, +font, +ins, +kbd, +q, +s, +samp, +small, +strike, +strong, +sub, +sup, +tt, +var, +dl, +dt, +dd, +ol, +ul, +li, +fieldset, +form, +label, +legend, +table, +caption, +tbody, +tfoot, +thead, +tr, +th, +td { + border: 0; + margin: 0; + padding: 0; +} + +html { + font-family: sans-serif; + -webkit-text-size-adjust: 100%; + -ms-text-size-adjust: 100%; +} + +article, +aside, +details, +figcaption, +figure, +footer, +header, +main, +nav, +section { + display: block; +} + +audio, +canvas, +progress, +video { + display: inline-block; + vertical-align: baseline; +} + +audio:not([controls]) { + display: none; + height: 0; +} + +[hidden], +template { + display: none; +} + +ol, +ul { + list-style: none; +} + +table { + /* tables still need 'cellspacing="0"' in the markup */ + border-collapse: separate; + border-spacing: 0; +} + +caption, +th, +td { + font-weight: normal; + text-align: left; + padding: 5px; +} + +blockquote:before, +blockquote:after, +q:before, +q:after { + content: ""; +} + +a { + background-color: transparent; +} + +a img { + border: 0; +} + +/*-------------------------------------------------------------- +# Elements +--------------------------------------------------------------*/ +body, +button, +input, +select, +textarea { + font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; + font-weight: normal; + text-transform: none; + font-size: 17px; + line-height: 1.5; +} + +p { + margin-bottom: 1.5em; +} + +h1, +h2, +h3, +h4, +h5, +h6 { + font-family: inherit; + font-size: 100%; + font-style: inherit; + font-weight: inherit; +} + +pre { + background: rgba(0, 0, 0, 0.05); + font-family: inherit; + font-size: inherit; + line-height: normal; + margin-bottom: 1.5em; + padding: 20px; + overflow: auto; + max-width: 100%; +} + +blockquote { + border-left: 5px solid rgba(0, 0, 0, 0.05); + padding: 20px; + font-size: 1.2em; + font-style: italic; + margin: 0 0 1.5em; + position: relative; +} + +blockquote p:last-child { + margin: 0; +} + +table, +th, +td { + border: 1px solid rgba(0, 0, 0, 0.1); +} + +table { + border-collapse: separate; + border-spacing: 0; + border-width: 1px 0 0 1px; + margin: 0 0 1.5em; + width: 100%; +} + +th, +td { + padding: 8px; +} + +th { + border-width: 0 1px 1px 0; +} + +td { + border-width: 0 1px 1px 0; +} + +hr { + background-color: rgba(0, 0, 0, 0.1); + border: 0; + height: 1px; + margin-bottom: 40px; + margin-top: 40px; +} + +fieldset { + padding: 0; + border: 0; + min-width: inherit; +} + +fieldset legend { + padding: 0; + margin-bottom: 1.5em; +} + +h1 { + font-size: 42px; + margin-bottom: 20px; + line-height: 1.2em; + font-weight: normal; + text-transform: none; +} + +h2 { + font-size: 35px; + margin-bottom: 20px; + line-height: 1.2em; + font-weight: normal; + text-transform: none; +} + +h3 { + font-size: 29px; + margin-bottom: 20px; + line-height: 1.2em; + font-weight: normal; + text-transform: none; +} + +h4 { + font-size: 24px; +} + +h5 { + font-size: 20px; +} + +h4, +h5, +h6 { + margin-bottom: 20px; +} + +ul, +ol { + margin: 0 0 1.5em 3em; +} + +ul { + list-style: disc; +} + +ol { + list-style: decimal; +} + +li > ul, +li > ol { + margin-bottom: 0; + margin-left: 1.5em; +} + +dt { + font-weight: bold; +} + +dd { + margin: 0 1.5em 1.5em; +} + +b, +strong { + font-weight: bold; +} + +dfn, +cite, +em, +i { + font-style: italic; +} + +address { + margin: 0 0 1.5em; +} + +code, +kbd, +tt, +var { + font: 15px Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace; +} + +abbr, +acronym { + border-bottom: 1px dotted #666; + cursor: help; +} + +mark, +ins { + text-decoration: none; +} + +sup, +sub { + font-size: 75%; + height: 0; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sup { + bottom: 1ex; +} + +sub { + top: .5ex; +} + +small { + font-size: 75%; +} + +big { + font-size: 125%; +} + +figure { + margin: 0; +} + +table { + margin: 0 0 1.5em; + width: 100%; +} + +th { + font-weight: bold; +} + +img { + height: auto; + /* Make sure images are scaled correctly. */ + max-width: 100%; + /* Adhere to container width. */ +} + +/*-------------------------------------------------------------- +# 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: baseline; + /* Improves appearance and consistency in all browsers */ + *vertical-align: middle; + /* Improves appearance and consistency in all browsers */ +} + +button, +html input[type="button"], +input[type="reset"], +input[type="submit"] { + border: 1px solid transparent; + background: #55555e; + cursor: pointer; + /* Improves usability and consistency of cursor style between image-type 'input' and others */ + -webkit-appearance: button; + /* Corrects inability to style clickable 'input' types in iOS */ + padding: 10px 20px; + color: #FFF; +} + +input[type="checkbox"], +input[type="radio"] { + box-sizing: border-box; + /* Addresses box sizing set to content-box in IE8/9 */ + padding: 0; + /* Addresses excess padding in IE8/9 */ +} + +input[type="search"] { + -webkit-appearance: textfield; + /* Addresses appearance set to searchfield in S5, Chrome */ + box-sizing: content-box; +} + +input[type="search"]::-webkit-search-decoration { + /* Corrects inner padding displayed oddly in S5, Chrome on OSX */ + -webkit-appearance: none; +} + +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"], +input[type="tel"], +input[type="number"], +textarea, +select { + background: #FAFAFA; + color: #666; + border: 1px solid #ccc; + border-radius: 0px; + padding: 10px 15px; + box-sizing: border-box; + max-width: 100%; +} + +textarea { + overflow: auto; + /* Removes default vertical scrollbar in IE6/7/8/9 */ + vertical-align: top; + /* Improves readability and alignment in all browsers */ + width: 100%; +} + +input[type="file"] { + max-width: 100%; + box-sizing: border-box; +} + +/*-------------------------------------------------------------- +# Links +--------------------------------------------------------------*/ +a, +button, +input { + transition: color 0.1s ease-in-out, background-color 0.1s ease-in-out; +} + +a, +a:visited, +a:hover, +a:focus { + text-decoration: none; +} + +.button, +.wp-block-button .wp-block-button__link { + padding: 10px 20px; + display: inline-block; +} + +.wp-block-button .wp-block-button__link { + font-size: inherit; + line-height: inherit; +} + +.using-mouse :focus { + outline: 0; +} + +.using-mouse ::-moz-focus-inner { + border: 0; +} + +/*-------------------------------------------------------------- +# Alignments +--------------------------------------------------------------*/ +.alignleft { + float: left; + margin-right: 1.5em; +} + +.alignright { + float: right; + margin-left: 1.5em; +} + +.aligncenter { + clear: both; + display: block; + margin: 0 auto; +} + +.size-auto, +.size-full, +.size-large, +.size-medium, +.size-thumbnail { + max-width: 100%; + height: auto; +} + +.no-sidebar .entry-content .alignfull { + margin-left: calc( -100vw / 2 + 100% / 2); + margin-right: calc( -100vw / 2 + 100% / 2); + max-width: 100vw; + width: auto; +} + +/*-------------------------------------------------------------- +# Accessibility +--------------------------------------------------------------*/ +.screen-reader-text { + border: 0; + clip: rect(1px, 1px, 1px, 1px); + -webkit-clip-path: inset(50%); + clip-path: inset(50%); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute !important; + width: 1px; + word-wrap: normal !important; +} + +.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; + -webkit-clip-path: none; + clip-path: none; + color: #21759b; + display: block; + font-size: 0.875rem; + font-weight: 700; + height: auto; + left: 5px; + line-height: normal; + padding: 15px 23px 14px; + text-decoration: none; + top: 5px; + width: auto; + z-index: 100000; +} + +/* Do not show the outline on the skip link target. */ +#primary[tabindex="-1"]:focus { + outline: 0; +} + +/*-------------------------------------------------------------- +# Clearings +--------------------------------------------------------------*/ +.clear:after, +.entry-content:after, +.comment-content:after, +.site-header:after, +.site-content:after, +.paging-navigation:after, +.site-footer:after, +.site-info:after, +.page-header-content-container:after, +.inside-navigation:not(.grid-container):after, +.inside-header:not(.grid-container):after, +.inside-top-bar:not(.grid-container):after, +.inside-footer-widgets:not(.grid-container):after { + content: ""; + display: table; + clear: both; +} + +/*-------------------------------------------------------------- +# Navigation +--------------------------------------------------------------*/ +.main-navigation { + z-index: 100; + padding: 0; + clear: both; + display: block; +} + +.main-navigation a { + display: block; + text-decoration: none; + font-weight: normal; + text-transform: none; + font-size: 15px; +} + +.main-navigation ul { + list-style: none; + margin: 0; + padding-left: 0; +} + +.main-navigation .main-nav ul li a { + padding-left: 20px; + padding-right: 20px; + line-height: 60px; +} + +.inside-navigation { + position: relative; +} + +.main-navigation li { + float: left; + position: relative; +} + +.sf-menu > li.menu-item-float-right { + float: right !important; +} + +.nav-float-right .inside-header .main-navigation { + float: right; + clear: right; +} + +.nav-float-left .inside-header .main-navigation { + float: left; + clear: left; +} + +.nav-aligned-right .main-navigation:not(.toggled) .menu > li, +.nav-aligned-center .main-navigation:not(.toggled) .menu > li { + float: none; + display: inline-block; +} + +.nav-aligned-right .main-navigation:not(.toggled) ul, +.nav-aligned-center .main-navigation:not(.toggled) ul { + letter-spacing: -0.31em; + font-size: 1em; +} + +.nav-aligned-right .main-navigation:not(.toggled) ul li, +.nav-aligned-center .main-navigation:not(.toggled) ul li { + letter-spacing: normal; +} + +.nav-aligned-center .main-navigation { + text-align: center; +} + +.nav-aligned-right .main-navigation { + text-align: right; +} + +.main-navigation li.search-item { + float: right; +} + +.main-navigation .mobile-bar-items a { + padding-left: 20px; + padding-right: 20px; + line-height: 60px; +} + +/*-------------------------------------------------------------- +## Dropdown Menus +--------------------------------------------------------------*/ +.main-navigation ul ul { + display: block; + box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.1); + float: left; + position: absolute; + left: -99999px; + opacity: 0; + z-index: 99999; + width: 200px; + text-align: left; + top: auto; + transition: opacity 80ms linear; + transition-delay: 0s; + pointer-events: none; + height: 0; + overflow: hidden; +} + +.main-navigation ul ul a { + display: block; +} + +.main-navigation ul ul li { + width: 100%; +} + +.main-navigation .main-nav ul ul li a { + line-height: normal; + padding: 10px 20px; + font-size: 14px; +} + +.main-navigation .main-nav ul li.menu-item-has-children > a { + padding-right: 0; + position: relative; +} + +.main-navigation.sub-menu-left .sub-menu { + right: 0; +} + +.main-navigation:not(.toggled) ul li:hover > ul, +.main-navigation:not(.toggled) ul li.sfHover > ul { + left: auto; + opacity: 1; + transition-delay: 150ms; + pointer-events: auto; + height: auto; + overflow: visible; +} + +.main-navigation:not(.toggled) ul ul li:hover > ul, +.main-navigation:not(.toggled) ul ul li.sfHover > ul { + left: 100%; + top: 0; +} + +.main-navigation.sub-menu-left:not(.toggled) ul ul li:hover > ul, +.main-navigation.sub-menu-left:not(.toggled) ul ul li.sfHover > ul { + right: 100%; + left: auto; +} + +.nav-float-right .main-navigation ul ul ul { + top: 0; +} + +.menu-item-has-children .dropdown-menu-toggle { + display: inline-block; + height: 100%; + clear: both; + padding-right: 20px; + padding-left: 10px; +} + +.menu-item-has-children ul .dropdown-menu-toggle { + padding-top: 10px; + padding-bottom: 10px; + margin-top: -10px; +} + +nav ul ul .menu-item-has-children .dropdown-menu-toggle, +.sidebar .menu-item-has-children .dropdown-menu-toggle { + float: right; +} + +/*-------------------------------------------------------------- +## Sidebar Navigation +--------------------------------------------------------------*/ +.widget-area .main-navigation li { + float: none; + display: block; + width: 100%; + padding: 0; + margin: 0; +} + +.sidebar .main-navigation.sub-menu-right ul li:hover ul, +.sidebar .main-navigation.sub-menu-right ul li.sfHover ul { + top: 0; + left: 100%; +} + +.sidebar .main-navigation.sub-menu-left ul li:hover ul, +.sidebar .main-navigation.sub-menu-left ul li.sfHover ul { + top: 0; + right: 100%; +} + +/*-------------------------------------------------------------- +# Post Navigation +--------------------------------------------------------------*/ +.site-main .comment-navigation, +.site-main .posts-navigation, +.site-main .post-navigation { + margin: 0 0 2em; + overflow: hidden; +} + +.site-main .post-navigation { + margin-bottom: 0; +} + +.paging-navigation .nav-previous, +.paging-navigation .nav-next { + display: none; +} + +.paging-navigation .nav-links > * { + padding: 0 5px; +} + +.paging-navigation .nav-links .current { + font-weight: bold; +} + +/* Less specific so we don't overwrite existing customizations. */ +.nav-links > *:first-child { + padding-left: 0; +} + +/*-------------------------------------------------------------- +# Header +--------------------------------------------------------------*/ +.site-header { + position: relative; +} + +.inside-header { + padding: 20px 40px; +} + +.main-title { + margin: 0; + font-size: 25px; + line-height: 1.2em; + word-wrap: break-word; + font-weight: bold; + text-transform: none; +} + +.site-description { + margin: 0; + line-height: 1.5; + font-weight: normal; + text-transform: none; + font-size: 15px; +} + +.site-logo { + display: inline-block; + max-width: 100%; +} + +.site-header .header-image { + vertical-align: middle; +} + +.header-widget { + float: right; + overflow: hidden; + max-width: 50%; +} + +.header-widget .widget { + padding: 0 0 20px; + margin-bottom: 0; +} + +.header-widget .widget:last-child { + padding-bottom: 0; +} + +.header-widget .widget-title { + margin-bottom: 15px; +} + +.nav-float-right .header-widget { + position: relative; + top: -10px; +} + +.nav-float-right .header-widget .widget { + padding: 0 0 10px; +} + +.nav-float-left .inside-header .site-branding, +.nav-float-left .inside-header .site-logo { + float: right; + clear: right; +} + +.nav-float-left .inside-header:after { + clear: both; + content: ''; + display: table; +} + +.nav-float-right .inside-header .site-branding { + display: inline-block; +} + +.site-branding-container { + display: inline-flex; + align-items: center; + text-align: left; +} + +.site-branding-container .site-logo { + margin-right: 1.5em; +} + +.header-aligned-center .site-header { + text-align: center; +} + +.header-aligned-right .site-header { + text-align: right; +} + +.header-aligned-right .site-branding-container { + text-align: right; +} + +.header-aligned-right .site-branding-container .site-logo { + order: 10; + margin-right: 0; + margin-left: 1.5em; +} + +/*-------------------------------------------------------------- +# Post Content +--------------------------------------------------------------*/ +.sticky { + display: block; +} + +.posted-on .updated, +.entry-header .gp-icon { + display: none; +} + +.byline, +.single .byline, +.group-blog .byline, +.entry-header .cat-links, +.entry-header .tags-links, +.entry-header .comments-link { + display: inline; +} + +footer.entry-meta .byline, +footer.entry-meta .posted-on { + display: block; +} + +.page-content:not(:first-child), +.entry-content:not(:first-child), +.entry-summary:not(:first-child) { + margin-top: 2em; +} + +.page-links { + clear: both; + margin: 0 0 1.5em; +} + +.blog .format-status .entry-title, +.archive .format-status .entry-title, +.blog .format-aside .entry-header, +.archive .format-aside .entry-header, +.blog .format-status .entry-header, +.archive .format-status .entry-header, +.blog .format-status .entry-meta, +.archive .format-status .entry-meta { + display: none; +} + +.blog .format-aside .entry-content, +.archive .format-aside .entry-content, +.blog .format-status .entry-content, +.archive .format-status .entry-content { + margin-top: 0; +} + +.blog .format-status .entry-content p:last-child, +.archive .format-status .entry-content p:last-child { + margin-bottom: 0; +} + +.site-content, +.entry-header { + word-wrap: break-word; +} + +.entry-title { + margin-bottom: 0; +} + +.author .page-header .page-title { + display: flex; + align-items: center; +} + +.author .page-header .avatar { + margin-right: 20px; +} + +.page-header > *:last-child, +.page-header .author-info > *:last-child { + margin-bottom: 0; +} + +.entry-meta { + font-size: 85%; + margin-top: .5em; + line-height: 1.5; +} + +footer.entry-meta { + margin-top: 2em; +} + +.cat-links, +.tags-links, +.comments-link { + display: block; +} + +.taxonomy-description p:last-child, +.read-more-container, +.page-content > p:last-child, +.entry-content > p:last-child, +.entry-summary > p:last-child { + margin-bottom: 0; +} + +/*-------------------------------------------------------------- +# Media +--------------------------------------------------------------*/ +/*-------------------------------------------------------------- +## Captions +--------------------------------------------------------------*/ +.wp-caption { + margin-bottom: 1.5em; + max-width: 100%; + position: relative; +} + +.wp-caption img[class*="wp-image-"] { + display: block; + margin: 0 auto 0; + max-width: 100%; +} + +.wp-caption .wp-caption-text { + font-size: 75%; + padding-top: 5px; + opacity: 0.8; +} + +.wp-caption img { + position: relative; + vertical-align: bottom; +} + +.wp-block-image figcaption { + font-size: 13px; + text-align: center; +} + +/*-------------------------------------------------------------- +## Galleries +--------------------------------------------------------------*/ +.wp-block-gallery, +ul.blocks-gallery-grid { + margin-left: 0; +} + +.wp-block-gallery .blocks-gallery-image figcaption, +.wp-block-gallery .blocks-gallery-item figcaption { + background: rgba(255, 255, 255, 0.7); + color: #000; + padding: 10px; + box-sizing: border-box; +} + +.gallery { + margin-bottom: 1.5em; +} + +.gallery-item { + display: inline-block; + text-align: center; + vertical-align: top; + width: 100%; +} + +.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; +} + +.site-main .gallery { + margin-bottom: 1.5em; +} + +.gallery-item img { + vertical-align: bottom; +} + +.gallery-icon { + padding: 5px; +} + +embed, +iframe, +object { + max-width: 100%; +} + +/*-------------------------------------------------------------- +# Comments +--------------------------------------------------------------*/ +.comment-content a { + word-wrap: break-word; +} + +.bypostauthor { + display: block; +} + +.comment, +.comment-list { + list-style-type: none; + padding: 0; + margin: 0; +} + +.comment-author-info { + display: inline-block; + vertical-align: middle; +} + +.comment-meta .avatar { + float: left; + margin-right: 10px; + border-radius: 50%; +} + +.comment-author cite { + font-style: normal; + font-weight: bold; +} + +.entry-meta.comment-metadata { + margin-top: 0; +} + +.comment-content { + margin-top: 1.5em; +} + +.comment-respond { + margin-top: 0; +} + +.comment-form > .form-submit { + margin-bottom: 0; +} + +.comment-form input, +.comment-form-comment { + margin-bottom: 10px; +} + +.comment-form #author, +.comment-form #email, +.comment-form #url { + display: block; +} + +.comment-metadata .edit-link:before { + display: none; +} + +.comment-body { + padding: 30px 0; +} + +.comment-content { + padding: 30px; + border: 1px solid rgba(0, 0, 0, 0.05); +} + +.depth-1.parent > .children { + border-bottom: 1px solid rgba(0, 0, 0, 0.05); +} + +.comment .children { + padding-left: 30px; + margin-top: -30px; + border-left: 1px solid rgba(0, 0, 0, 0.05); +} + +.pingback .comment-body, +.trackback .comment-body { + border-bottom: 1px solid rgba(0, 0, 0, 0.05); +} + +.pingback .edit-link { + font-size: 13px; +} + +.comment-content p:last-child { + margin-bottom: 0; +} + +.comment-list > .comment:first-child { + padding-top: 0; + margin-top: 0; + border-top: 0; +} + +ol.comment-list { + margin-bottom: 1.5em; +} + +.comment-form-cookies-consent { + display: flex; + align-items: center; +} + +.comment-form-cookies-consent input { + margin-right: 0.5em; + margin-bottom: 0; +} + +.one-container .comments-area { + margin-top: 1.5em; +} + +.comment-content .reply { + font-size: 85%; +} + +#cancel-comment-reply-link { + padding-left: 10px; +} + +/*-------------------------------------------------------------- +# Widgets +--------------------------------------------------------------*/ +.widget-area .widget { + padding: 40px; +} + +.widget select { + max-width: 100%; +} + +.sidebar .widget *:last-child, +.footer-widgets .widget *:last-child { + margin-bottom: 0; +} + +.widget-title { + margin-bottom: 30px; + font-size: 20px; + line-height: 1.5; + font-weight: normal; + text-transform: none; +} + +.widget ul, +.widget ol { + margin: 0; +} + +.widget .search-field { + width: 100%; +} + +.widget_search .search-submit { + display: none; +} + +.widget { + margin: 0 0 30px; + box-sizing: border-box; +} + +.widget:last-child, +.separate-containers .widget:last-child { + margin-bottom: 0; +} + +.sidebar .widget, +.footer-widgets .widget { + font-size: 17px; +} + +.widget ul li { + list-style-type: none; + position: relative; + padding-bottom: 5px; +} + +.widget_categories .children { + margin-left: 1.5em; + padding-top: 5px; +} + +.widget_categories .children li:last-child { + padding-bottom: 0; +} + +.widget_nav_menu ul ul, +.widget_pages ul ul { + margin-left: 1em; + margin-top: 5px; +} + +.widget ul li.menu-item-has-children, +.widget ul li.page_item_has_children { + padding-bottom: 0; +} + +#wp-calendar { + table-layout: fixed; + font-size: 80%; +} + +#wp-calendar #prev, +#wp-calendar #prev + .pad { + border-right: 0; +} + +.sidebar .grid-container { + max-width: 100%; + width: 100%; +} + +/*-------------------------------------------------------------- +# Content Layout +--------------------------------------------------------------*/ +.post { + margin: 0 0 2em; +} + +.page-header { + margin-bottom: 30px; +} + +/*-------------------------------------------------------------- +## One Container +--------------------------------------------------------------*/ +.one-container.both-left .inside-left-sidebar, +.one-container.both-right .inside-left-sidebar { + margin-right: 20px; +} + +.one-container.both-left .inside-right-sidebar, +.one-container.both-right .inside-right-sidebar { + margin-left: 20px; +} + +.one-container:not(.page) .inside-article { + padding: 0 0 30px 0; +} + +.one-container.right-sidebar .site-main, +.one-container.both-right .site-main { + margin-right: 40px; +} + +.one-container.left-sidebar .site-main, +.one-container.both-left .site-main { + margin-left: 40px; +} + +.one-container.both-sidebars .site-main { + margin: 0px 40px 0px 40px; +} + +.one-container .site-content { + padding: 40px; +} + +/*-------------------------------------------------------------- +## Separate Containers +--------------------------------------------------------------*/ +.separate-containers .inside-article, +.separate-containers .comments-area, +.separate-containers .page-header, +.separate-containers .paging-navigation { + padding: 40px; +} + +.separate-containers .widget, +.separate-containers .site-main > *, +.separate-containers .page-header { + margin-bottom: 20px; +} + +.separate-containers .site-main { + margin: 20px; +} + +.separate-containers.no-sidebar .site-main { + margin-left: 0; + margin-right: 0; +} + +.separate-containers.right-sidebar .site-main, +.separate-containers.both-right .site-main { + margin-left: 0; +} + +.separate-containers.left-sidebar .site-main, +.separate-containers.both-left .site-main { + margin-right: 0; +} + +.separate-containers.both-right .inside-left-sidebar, +.separate-containers.both-left .inside-left-sidebar { + margin-right: 10px; +} + +.separate-containers.both-right .inside-right-sidebar, +.separate-containers.both-left .inside-right-sidebar { + margin-left: 10px; +} + +.separate-containers .inside-right-sidebar, +.separate-containers .inside-left-sidebar { + margin-top: 20px; + margin-bottom: 20px; +} + +.inside-page-header { + padding: 40px; +} + +.widget-area .main-navigation { + margin-bottom: 20px; +} + +.separate-containers .site-main > *:last-child, +.one-container .site-main > *:last-child { + margin-bottom: 0; +} + +/*-------------------------------------------------------------- +## Full Width Content +--------------------------------------------------------------*/ +.full-width-content .container.grid-container { + max-width: 100%; +} + +.full-width-content.no-sidebar.separate-containers .site-main { + margin: 0; +} + +.full-width-content.separate-containers .inside-article, +.full-width-content.one-container .site-content { + padding: 0; +} + +.full-width-content .entry-content .alignwide { + margin-left: 0; + width: auto; + max-width: unset; +} + +/*-------------------------------------------------------------- +## Contained Content +--------------------------------------------------------------*/ +.contained-content.separate-containers .inside-article, +.contained-content.one-container .site-content { + padding: 0; +} + +/*-------------------------------------------------------------- +# Footer +--------------------------------------------------------------*/ +.site-info { + text-align: center; + font-size: 15px; +} + +.site-info { + padding: 20px 40px; +} + +.footer-widgets { + padding: 40px; +} + +.site-footer .footer-widgets-container .inner-padding { + padding: 0px 0px 0px 40px; +} + +.site-footer .footer-widgets-container .inside-footer-widgets { + margin-left: -40px; +} + +/*-------------------------------------------------------------- +## Footer Bar +--------------------------------------------------------------*/ +.footer-bar-active .footer-bar .widget { + padding: 0; +} + +.footer-bar .widget_nav_menu > div > ul { + display: inline-block; + vertical-align: top; +} + +.footer-bar .widget_nav_menu li { + margin: 0 10px; + float: left; + padding: 0; +} + +.footer-bar .widget_nav_menu li:first-child { + margin-left: 0; +} + +.footer-bar .widget_nav_menu li:last-child { + margin-right: 0; +} + +.footer-bar .widget_nav_menu li ul { + display: none; +} + +.footer-bar .textwidget p:last-child { + margin: 0; +} + +.footer-bar .widget-title { + display: none; +} + +.footer-bar-align-right .copyright-bar { + float: left; +} + +.footer-bar-align-right .footer-bar { + float: right; + text-align: right; +} + +.footer-bar-align-left .copyright-bar { + float: right; + text-align: right; +} + +.footer-bar-align-left .footer-bar { + float: left; + text-align: left; +} + +.footer-bar-align-center .copyright-bar { + float: none; + text-align: center; +} + +.footer-bar-align-center .footer-bar { + float: none; + text-align: center; + margin-bottom: 10px; +} + +/*-------------------------------------------------------------- +# Featured Images +--------------------------------------------------------------*/ +.post-image:not(:first-child) { + margin-top: 2em; +} + +.page-header-image, +.page-header-image-single { + line-height: 0; + /* no more weird spacing */ +} + +.separate-containers .inside-article > [class*="page-header-"], +.one-container .inside-article > [class*="page-header-"] { + margin-bottom: 2em; + margin-top: 0; +} + +.inside-article .page-header-image-single.page-header-below-title { + margin-top: 2em; +} + +.separate-containers .page-header-image, +.separate-containers .page-header-contained, +.separate-containers .page-header-content, +.separate-containers .page-header-image-single, +.separate-containers .page-header-content-single { + margin-top: 20px; +} + +/*-------------------------------------------------------------- +# Top Bar +--------------------------------------------------------------*/ +.top-bar { + font-weight: normal; + text-transform: none; + font-size: 13px; +} + +.top-bar .inside-top-bar .widget { + padding: 0; + display: inline-block; + margin: 0; +} + +.top-bar .inside-top-bar .textwidget p:last-child { + margin: 0; +} + +.top-bar .widget-title { + display: none; +} + +.top-bar .widget_nav_menu li { + margin: 0 10px; + float: left; + padding: 0; +} + +.top-bar .widget_nav_menu li:first-child { + margin-left: 0; +} + +.top-bar .widget_nav_menu li:last-child { + margin-right: 0; +} + +.top-bar .widget_nav_menu li ul { + display: none; +} + +.top-bar .widget_nav_menu > div > ul { + display: inline-block; + vertical-align: top; +} + +.inside-top-bar { + padding: 10px 40px; +} + +.top-bar-align-center { + text-align: center; +} + +.top-bar-align-center .inside-top-bar .widget:not(:first-child) { + margin-left: 10px; +} + +.top-bar-align-center .inside-top-bar .widget:first-child:last-child { + display: block; +} + +.top-bar-align-right { + text-align: right; +} + +.top-bar-align-right .inside-top-bar > .widget:nth-child(even) { + float: left; + margin-right: 10px; +} + +.top-bar-align-right .inside-top-bar > .widget:nth-child(odd) { + margin-left: 10px; +} + +.top-bar-align-left .inside-top-bar > .widget:nth-child(odd) { + float: left; + margin-right: 10px; +} + +.top-bar-align-left .inside-top-bar > .widget:nth-child(even) { + margin-left: 10px; + float: right; +} + +/*-------------------------------------------------------------- +# Icons +--------------------------------------------------------------*/ +.gp-icon { + display: inline-flex; + align-self: center; +} + +.gp-icon svg { + height: 1em; + width: 1em; + top: .125em; + position: relative; + fill: currentColor; +} + +.icon-menu-bars svg:nth-child(2), +.toggled .icon-menu-bars svg:nth-child(1), +.icon-search svg:nth-child(2), +.close-search .icon-search svg:nth-child(1) { + display: none; +} + +.toggled .icon-menu-bars svg:nth-child(2), +.close-search .icon-search svg:nth-child(2) { + display: block; +} + +.entry-meta .gp-icon { + margin-right: 0.6em; + opacity: 0.7; +} + +nav.toggled .icon-arrow-left svg { + transform: rotate(-90deg); +} + +nav.toggled .icon-arrow-right svg { + transform: rotate(90deg); +} + +nav.toggled .sfHover > a > .dropdown-menu-toggle .gp-icon svg { + transform: rotate(180deg); +} + +nav.toggled .sfHover > a > .dropdown-menu-toggle .gp-icon.icon-arrow-left svg { + transform: rotate(-270deg); +} + +nav.toggled .sfHover > a > .dropdown-menu-toggle .gp-icon.icon-arrow-right svg { + transform: rotate(270deg); +} + +/*-------------------------------------------------------------- +# Compatibility +--------------------------------------------------------------*/ +/* Bootstrap fix */ +.container.grid-container { + width: auto; +} + +/* Globally hidden elements when Infinite Scroll is supported and in use. */ +.infinite-scroll .paging-navigation, +.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; +} + +/* SiteOrigin Page Builder */ +.so-panel.widget { + padding: 0; +} + +/* MailChimp CSS */ +#mc_embed_signup .clear { + display: block; + height: auto; + visibility: visible; + width: auto; +} diff --git a/wp-content/themes/generatepress/assets/css/style.min.css b/wp-content/themes/generatepress/assets/css/style.min.css index 93ff6e59..49fc2c09 100644 --- a/wp-content/themes/generatepress/assets/css/style.min.css +++ b/wp-content/themes/generatepress/assets/css/style.min.css @@ -1 +1 @@ -a,abbr,acronym,address,applet,big,blockquote,body,caption,cite,code,dd,del,dfn,div,dl,dt,em,fieldset,font,form,h1,h2,h3,h4,h5,h6,html,iframe,ins,kbd,label,legend,li,object,ol,p,pre,q,s,samp,small,span,strike,strong,sub,sup,table,tbody,td,tfoot,th,thead,tr,tt,ul,var{border:0;margin:0;padding:0}html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}article,aside,details,figcaption,figure,footer,header,main,nav,section{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}ol,ul{list-style:none}table{border-collapse:separate;border-spacing:0}caption,td,th{font-weight:400;text-align:left;padding:5px}blockquote:after,blockquote:before,q:after,q:before{content:""}a{background-color:transparent}a img{border:0}body,button,input,select,textarea{font-family:-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-weight:400;text-transform:none;font-size:17px;line-height:1.5}p{margin-bottom:1.5em}h1,h2,h3,h4,h5,h6{font-family:inherit;font-size:100%;font-style:inherit;font-weight:inherit}pre{background:rgba(0,0,0,.05);font-family:inherit;font-size:inherit;line-height:normal;margin-bottom:1.5em;padding:20px;overflow:auto;max-width:100%}blockquote{border-left:5px solid rgba(0,0,0,.05);padding:20px;font-size:1.2em;font-style:italic;margin:0 0 1.5em;position:relative}blockquote p:last-child{margin:0}table,td,th{border:1px solid rgba(0,0,0,.1)}table{border-collapse:separate;border-spacing:0;border-width:1px 0 0 1px;margin:0 0 1.5em;width:100%}td,th{padding:8px}th{border-width:0 1px 1px 0}td{border-width:0 1px 1px 0}hr{background-color:rgba(0,0,0,.1);border:0;height:1px;margin-bottom:40px;margin-top:40px}fieldset{padding:0;border:0;min-width:inherit}fieldset legend{padding:0;margin-bottom:1.5em}h1{font-size:42px;margin-bottom:20px;line-height:1.2em;font-weight:400;text-transform:none}h2{font-size:35px;margin-bottom:20px;line-height:1.2em;font-weight:400;text-transform:none}h3{font-size:29px;margin-bottom:20px;line-height:1.2em;font-weight:400;text-transform:none}h4{font-size:24px}h5{font-size:20px}h4,h5,h6{margin-bottom:20px}ol,ul{margin:0 0 1.5em 3em}ul{list-style:disc}ol{list-style:decimal}li>ol,li>ul{margin-bottom:0;margin-left:1.5em}dt{font-weight:700}dd{margin:0 1.5em 1.5em}b,strong{font-weight:700}cite,dfn,em,i{font-style:italic}address{margin:0 0 1.5em}code,kbd,tt,var{font:15px Monaco,Consolas,"Andale Mono","DejaVu Sans Mono",monospace}abbr,acronym{border-bottom:1px dotted #666;cursor:help}ins,mark{text-decoration:none}sub,sup{font-size:75%;height:0;line-height:0;position:relative;vertical-align:baseline}sup{bottom:1ex}sub{top:.5ex}small{font-size:75%}big{font-size:125%}figure{margin:0}table{margin:0 0 1.5em;width:100%}th{font-weight:700}img{height:auto;max-width:100%}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline}button,html input[type=button],input[type=reset],input[type=submit]{border:1px solid transparent;background:#55555e;cursor:pointer;-webkit-appearance:button;padding:10px 20px;color:#fff}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=search]{-webkit-appearance:textfield;box-sizing:content-box}input[type=search]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input[type=email],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=url],select,textarea{background:#fafafa;color:#666;border:1px solid #ccc;border-radius:0;padding:10px 15px;box-sizing:border-box;max-width:100%}textarea{overflow:auto;vertical-align:top;width:100%}input[type=file]{max-width:100%;box-sizing:border-box}a,button,input{transition:color .1s ease-in-out,background-color .1s ease-in-out}a,a:focus,a:hover,a:visited{text-decoration:none}.button,.wp-block-button .wp-block-button__link{padding:10px 20px;display:inline-block}.wp-block-button .wp-block-button__link{font-size:inherit;line-height:inherit}.using-mouse :focus{outline:0}.using-mouse ::-moz-focus-inner{border:0}.alignleft{float:left;margin-right:1.5em}.alignright{float:right;margin-left:1.5em}.aligncenter{clear:both;display:block;margin:0 auto}.size-auto,.size-full,.size-large,.size-medium,.size-thumbnail{max-width:100%;height:auto}.no-sidebar .entry-content .alignfull{margin-left:calc(-100vw / 2 + 100% / 2);margin-right:calc(-100vw / 2 + 100% / 2);max-width:100vw;width:auto}.screen-reader-text{border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute!important;width:1px;word-wrap:normal!important}.screen-reader-text:focus{background-color:#f1f1f1;border-radius:3px;box-shadow:0 0 2px 2px rgba(0,0,0,.6);clip:auto!important;-webkit-clip-path:none;clip-path:none;color:#21759b;display:block;font-size:.875rem;font-weight:700;height:auto;left:5px;line-height:normal;padding:15px 23px 14px;text-decoration:none;top:5px;width:auto;z-index:100000}#primary[tabindex="-1"]:focus{outline:0}.clear:after,.comment-content:after,.entry-content:after,.inside-footer-widgets:not(.grid-container):after,.inside-header:not(.grid-container):after,.inside-navigation:not(.grid-container):after,.inside-top-bar:not(.grid-container):after,.page-header-content-container:after,.paging-navigation:after,.site-content:after,.site-footer:after,.site-header:after,.site-info:after{content:"";display:table;clear:both}.main-navigation{z-index:100;padding:0;clear:both;display:block}.main-navigation a{display:block;text-decoration:none;font-weight:400;text-transform:none;font-size:15px}.main-navigation ul{list-style:none;margin:0;padding-left:0}.main-navigation .main-nav ul li a{padding-left:20px;padding-right:20px;line-height:60px}.inside-navigation{position:relative}.main-navigation li{float:left;position:relative}.sf-menu>li.menu-item-float-right{float:right!important}.nav-float-right .inside-header .main-navigation{float:right;clear:right}.nav-float-left .inside-header .main-navigation{float:left;clear:left}.nav-aligned-center .main-navigation:not(.toggled) .menu>li,.nav-aligned-right .main-navigation:not(.toggled) .menu>li{float:none;display:inline-block}.nav-aligned-center .main-navigation:not(.toggled) ul,.nav-aligned-right .main-navigation:not(.toggled) ul{letter-spacing:-.31em;font-size:1em}.nav-aligned-center .main-navigation:not(.toggled) ul li,.nav-aligned-right .main-navigation:not(.toggled) ul li{letter-spacing:normal}.nav-aligned-center .main-navigation{text-align:center}.nav-aligned-right .main-navigation{text-align:right}.main-navigation li.search-item{float:right}.main-navigation .mobile-bar-items a{padding-left:20px;padding-right:20px;line-height:60px}.main-navigation ul ul{display:block;box-shadow:1px 1px 0 rgba(0,0,0,.1);float:left;position:absolute;left:-99999px;opacity:0;z-index:99999;width:200px;text-align:left;top:auto;transition:opacity 80ms linear;transition-delay:0s;pointer-events:none;height:0;overflow:hidden}.main-navigation ul ul a{display:block}.main-navigation ul ul li{width:100%}.main-navigation .main-nav ul ul li a{line-height:normal;padding:10px 20px;font-size:14px}.main-navigation .main-nav ul li.menu-item-has-children>a{padding-right:0;position:relative}.main-navigation.sub-menu-left .sub-menu{right:0}.main-navigation:not(.toggled) ul li.sfHover>ul,.main-navigation:not(.toggled) ul li:hover>ul{left:auto;opacity:1;transition-delay:150ms;pointer-events:auto;height:auto;overflow:visible}.main-navigation:not(.toggled) ul ul li.sfHover>ul,.main-navigation:not(.toggled) ul ul li:hover>ul{left:100%;top:0}.main-navigation.sub-menu-left:not(.toggled) ul ul li.sfHover>ul,.main-navigation.sub-menu-left:not(.toggled) ul ul li:hover>ul{right:100%;left:auto}.nav-float-right .main-navigation ul ul ul{top:0}.menu-item-has-children .dropdown-menu-toggle{display:inline-block;height:100%;clear:both;padding-right:20px;padding-left:10px}.menu-item-has-children ul .dropdown-menu-toggle{padding-top:10px;padding-bottom:10px;margin-top:-10px}.sidebar .menu-item-has-children .dropdown-menu-toggle,nav ul ul .menu-item-has-children .dropdown-menu-toggle{float:right}.widget-area .main-navigation li{float:none;display:block;width:100%;padding:0;margin:0}.sidebar .main-navigation.sub-menu-right ul li.sfHover ul,.sidebar .main-navigation.sub-menu-right ul li:hover ul{top:0;left:100%}.sidebar .main-navigation.sub-menu-left ul li.sfHover ul,.sidebar .main-navigation.sub-menu-left ul li:hover ul{top:0;right:100%}.site-main .comment-navigation,.site-main .post-navigation,.site-main .posts-navigation{margin:0 0 2em;overflow:hidden}.site-main .post-navigation{margin-bottom:0}.paging-navigation .nav-next,.paging-navigation .nav-previous{display:none}.paging-navigation .nav-links>*{padding:0 5px}.paging-navigation .nav-links .current{font-weight:700}.nav-links>:first-child{padding-left:0}.site-header{position:relative}.inside-header{padding:20px 40px}.main-title{margin:0;font-size:25px;line-height:1.2em;word-wrap:break-word;font-weight:700;text-transform:none}.site-description{margin:0;line-height:1.5;font-weight:400;text-transform:none;font-size:15px}.site-logo{display:inline-block;max-width:100%}.site-header .header-image{vertical-align:middle}.header-widget{float:right;overflow:hidden;max-width:50%}.header-widget .widget{padding:0 0 20px;margin-bottom:0}.header-widget .widget:last-child{padding-bottom:0}.header-widget .widget-title{margin-bottom:15px}.nav-float-right .header-widget{position:relative;top:-10px}.nav-float-right .header-widget .widget{padding:0 0 10px}.nav-float-left .inside-header .site-branding,.nav-float-left .inside-header .site-logo{float:right;clear:right}.nav-float-left .inside-header:after{clear:both;content:'';display:table}.nav-float-right .inside-header .site-branding{display:inline-block}.site-branding-container{display:inline-flex;align-items:center;text-align:left}.site-branding-container .site-logo{margin-right:1.5em}.header-aligned-center .site-header{text-align:center}.header-aligned-right .site-header{text-align:right}.header-aligned-right .site-branding-container{text-align:right}.header-aligned-right .site-branding-container .site-logo{order:10;margin-right:0;margin-left:1.5em}.sticky{display:block}.entry-header .gp-icon,.posted-on .updated{display:none}.byline,.entry-header .cat-links,.entry-header .comments-link,.entry-header .tags-links,.group-blog .byline,.single .byline{display:inline}footer.entry-meta .byline,footer.entry-meta .posted-on{display:block}.entry-content:not(:first-child),.entry-summary:not(:first-child),.page-content:not(:first-child){margin-top:2em}.page-links{clear:both;margin:0 0 1.5em}.archive .format-aside .entry-header,.archive .format-status .entry-header,.archive .format-status .entry-meta,.archive .format-status .entry-title,.blog .format-aside .entry-header,.blog .format-status .entry-header,.blog .format-status .entry-meta,.blog .format-status .entry-title{display:none}.archive .format-aside .entry-content,.archive .format-status .entry-content,.blog .format-aside .entry-content,.blog .format-status .entry-content{margin-top:0}.archive .format-status .entry-content p:last-child,.blog .format-status .entry-content p:last-child{margin-bottom:0}.entry-header,.site-content{word-wrap:break-word}.entry-title{margin-bottom:0}.author .page-header .page-title{display:flex;align-items:center}.author .page-header .avatar{margin-right:20px}.page-header .author-info>:last-child,.page-header>:last-child{margin-bottom:0}.entry-meta{font-size:85%;margin-top:.5em;line-height:1.5}footer.entry-meta{margin-top:2em}.cat-links,.comments-link,.tags-links{display:block}.entry-content>p:last-child,.entry-summary>p:last-child,.page-content>p:last-child,.read-more-container,.taxonomy-description p:last-child{margin-bottom:0}.wp-caption{margin-bottom:1.5em;max-width:100%;position:relative}.wp-caption img[class*=wp-image-]{display:block;margin:0 auto 0;max-width:100%}.wp-caption .wp-caption-text{font-size:75%;padding-top:5px;opacity:.8}.wp-caption img{position:relative;vertical-align:bottom}.wp-block-image figcaption{font-size:13px;text-align:center}.wp-block-gallery,ul.blocks-gallery-grid{margin-left:0}.wp-block-gallery .blocks-gallery-image figcaption,.wp-block-gallery .blocks-gallery-item figcaption{background:rgba(255,255,255,.7);color:#000;padding:10px;box-sizing:border-box}.gallery{margin-bottom:1.5em}.gallery-item{display:inline-block;text-align:center;vertical-align:top;width:100%}.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}.site-main .gallery{margin-bottom:1.5em}.gallery-item img{vertical-align:bottom}.gallery-icon{padding:5px}embed,iframe,object{max-width:100%}.comment-content a{word-wrap:break-word}.bypostauthor{display:block}.comment,.comment-list{list-style-type:none;padding:0;margin:0}.comment-author-info{display:inline-block;vertical-align:middle}.comment-meta .avatar{float:left;margin-right:10px;border-radius:50%}.comment-author cite{font-style:normal;font-weight:700}.entry-meta.comment-metadata{margin-top:0}.comment-content{margin-top:1.5em}.comment-respond{margin-top:0}.comment-form>.form-submit{margin-bottom:0}.comment-form input,.comment-form-comment{margin-bottom:10px}.comment-form #author,.comment-form #email,.comment-form #url{display:block}.comment-metadata .edit-link:before{display:none}.comment-body{padding:30px 0}.comment-content{padding:30px;border:1px solid rgba(0,0,0,.05)}.depth-1.parent>.children{border-bottom:1px solid rgba(0,0,0,.05)}.comment .children{padding-left:30px;margin-top:-30px;border-left:1px solid rgba(0,0,0,.05)}.pingback .comment-body,.trackback .comment-body{border-bottom:1px solid rgba(0,0,0,.05)}.pingback .edit-link{font-size:13px}.comment-content p:last-child{margin-bottom:0}.comment-list>.comment:first-child{padding-top:0;margin-top:0;border-top:0}ol.comment-list{margin-bottom:1.5em}.comment-form-cookies-consent{display:flex;align-items:center}.comment-form-cookies-consent input{margin-right:.5em;margin-bottom:0}.one-container .comments-area{margin-top:1.5em}.comment-content .reply{font-size:85%}#cancel-comment-reply-link{padding-left:10px}.widget-area .widget{padding:40px}.widget select{max-width:100%}.footer-widgets .widget :last-child,.sidebar .widget :last-child{margin-bottom:0}.widget-title{margin-bottom:30px;font-size:20px;line-height:1.5;font-weight:400;text-transform:none}.widget ol,.widget ul{margin:0}.widget .search-field{width:100%}.widget_search .search-submit{display:none}.widget{margin:0 0 30px;box-sizing:border-box}.separate-containers .widget:last-child,.widget:last-child{margin-bottom:0}.footer-widgets .widget,.sidebar .widget{font-size:17px}.widget ul li{list-style-type:none;position:relative;padding-bottom:5px}.widget_categories .children{margin-left:1.5em;padding-top:5px}.widget_categories .children li:last-child{padding-bottom:0}.widget_nav_menu ul ul,.widget_pages ul ul{margin-left:1em;margin-top:5px}.widget ul li.menu-item-has-children,.widget ul li.page_item_has_children{padding-bottom:0}#wp-calendar{table-layout:fixed;font-size:80%}#wp-calendar #prev,#wp-calendar #prev+.pad{border-right:0}.sidebar .grid-container{max-width:100%;width:100%}.post{margin:0 0 2em}.page-header{margin-bottom:30px}.one-container.both-left .inside-left-sidebar,.one-container.both-right .inside-left-sidebar{margin-right:20px}.one-container.both-left .inside-right-sidebar,.one-container.both-right .inside-right-sidebar{margin-left:20px}.one-container:not(.page) .inside-article{padding:0 0 30px 0}.one-container.both-right .site-main,.one-container.right-sidebar .site-main{margin-right:40px}.one-container.both-left .site-main,.one-container.left-sidebar .site-main{margin-left:40px}.one-container.both-sidebars .site-main{margin:0 40px 0 40px}.one-container .site-content{padding:40px}.separate-containers .comments-area,.separate-containers .inside-article,.separate-containers .page-header,.separate-containers .paging-navigation{padding:40px}.separate-containers .page-header,.separate-containers .site-main>*,.separate-containers .widget{margin-bottom:20px}.separate-containers .site-main{margin:20px}.separate-containers.no-sidebar .site-main{margin-left:0;margin-right:0}.separate-containers.both-right .site-main,.separate-containers.right-sidebar .site-main{margin-left:0}.separate-containers.both-left .site-main,.separate-containers.left-sidebar .site-main{margin-right:0}.separate-containers.both-left .inside-left-sidebar,.separate-containers.both-right .inside-left-sidebar{margin-right:10px}.separate-containers.both-left .inside-right-sidebar,.separate-containers.both-right .inside-right-sidebar{margin-left:10px}.separate-containers .inside-left-sidebar,.separate-containers .inside-right-sidebar{margin-top:20px;margin-bottom:20px}.inside-page-header,.wp-block-group__inner-container{padding:40px}.widget-area .main-navigation{margin-bottom:20px}.one-container .site-main>:last-child,.separate-containers .site-main>:last-child{margin-bottom:0}.full-width-content .container.grid-container{max-width:100%}.full-width-content.no-sidebar.separate-containers .site-main{margin:0}.full-width-content.one-container .site-content,.full-width-content.separate-containers .inside-article{padding:0}.full-width-content .entry-content .alignwide{margin-left:0;width:auto;max-width:unset}.contained-content.one-container .site-content,.contained-content.separate-containers .inside-article{padding:0}.site-info{text-align:center;font-size:15px}.site-info{padding:20px 40px}.footer-widgets{padding:40px}.site-footer .footer-widgets-container .inner-padding{padding:0 0 0 40px}.site-footer .footer-widgets-container .inside-footer-widgets{margin-left:-40px}.footer-bar-active .footer-bar .widget{padding:0}.footer-bar .widget_nav_menu>div>ul{display:inline-block;vertical-align:top}.footer-bar .widget_nav_menu li{margin:0 10px;float:left;padding:0}.footer-bar .widget_nav_menu li:first-child{margin-left:0}.footer-bar .widget_nav_menu li:last-child{margin-right:0}.footer-bar .widget_nav_menu li ul{display:none}.footer-bar .textwidget p:last-child{margin:0}.footer-bar .widget-title{display:none}.footer-bar-align-right .copyright-bar{float:left}.footer-bar-align-right .footer-bar{float:right;text-align:right}.footer-bar-align-left .copyright-bar{float:right;text-align:right}.footer-bar-align-left .footer-bar{float:left;text-align:left}.footer-bar-align-center .copyright-bar{float:none;text-align:center}.footer-bar-align-center .footer-bar{float:none;text-align:center;margin-bottom:10px}.post-image:not(:first-child){margin-top:2em}.page-header-image,.page-header-image-single{line-height:0}.one-container .inside-article>[class*=page-header-],.separate-containers .inside-article>[class*=page-header-]{margin-bottom:2em;margin-top:0}.inside-article .page-header-image-single.page-header-below-title{margin-top:2em}.separate-containers .page-header-contained,.separate-containers .page-header-content,.separate-containers .page-header-content-single,.separate-containers .page-header-image,.separate-containers .page-header-image-single{margin-top:20px}.top-bar{font-weight:400;text-transform:none;font-size:13px}.top-bar .inside-top-bar .widget{padding:0;display:inline-block;margin:0}.top-bar .inside-top-bar .textwidget p:last-child{margin:0}.top-bar .widget-title{display:none}.top-bar .widget_nav_menu li{margin:0 10px;float:left;padding:0}.top-bar .widget_nav_menu li:first-child{margin-left:0}.top-bar .widget_nav_menu li:last-child{margin-right:0}.top-bar .widget_nav_menu li ul{display:none}.top-bar .widget_nav_menu>div>ul{display:inline-block;vertical-align:top}.inside-top-bar{padding:10px 40px}.top-bar-align-center{text-align:center}.top-bar-align-center .inside-top-bar .widget:not(:first-child){margin-left:10px}.top-bar-align-center .inside-top-bar .widget:first-child:last-child{display:block}.top-bar-align-right{text-align:right}.top-bar-align-right .inside-top-bar>.widget:nth-child(even){float:left;margin-right:10px}.top-bar-align-right .inside-top-bar>.widget:nth-child(odd){margin-left:10px}.top-bar-align-left .inside-top-bar>.widget:nth-child(odd){float:left;margin-right:10px}.top-bar-align-left .inside-top-bar>.widget:nth-child(even){margin-left:10px;float:right}.gp-icon{display:inline-flex;align-self:center}.gp-icon svg{height:1em;width:1em;top:.125em;position:relative;fill:currentColor}.close-search .icon-search svg:nth-child(1),.icon-menu-bars svg:nth-child(2),.icon-search svg:nth-child(2),.toggled .icon-menu-bars svg:nth-child(1){display:none}.close-search .icon-search svg:nth-child(2),.toggled .icon-menu-bars svg:nth-child(2){display:block}.entry-meta .gp-icon{margin-right:.6em;opacity:.7}nav.toggled .icon-arrow-left svg{transform:rotate(-90deg)}nav.toggled .icon-arrow-right svg{transform:rotate(90deg)}nav.toggled .sfHover>a>.dropdown-menu-toggle .gp-icon svg{transform:rotate(180deg)}nav.toggled .sfHover>a>.dropdown-menu-toggle .gp-icon.icon-arrow-left svg{transform:rotate(-270deg)}nav.toggled .sfHover>a>.dropdown-menu-toggle .gp-icon.icon-arrow-right svg{transform:rotate(270deg)}.container.grid-container{width:auto}.infinite-scroll .paging-navigation,.infinite-scroll.neverending .site-footer{display:none}.infinity-end.neverending .site-footer{display:block}.so-panel.widget{padding:0}#mc_embed_signup .clear{display:block;height:auto;visibility:visible;width:auto} \ No newline at end of file +a,abbr,acronym,address,applet,big,blockquote,body,caption,cite,code,dd,del,dfn,div,dl,dt,em,fieldset,font,form,h1,h2,h3,h4,h5,h6,html,iframe,ins,kbd,label,legend,li,object,ol,p,pre,q,s,samp,small,span,strike,strong,sub,sup,table,tbody,td,tfoot,th,thead,tr,tt,ul,var{border:0;margin:0;padding:0}html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}article,aside,details,figcaption,figure,footer,header,main,nav,section{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}ol,ul{list-style:none}table{border-collapse:separate;border-spacing:0}caption,td,th{font-weight:400;text-align:left;padding:5px}blockquote:after,blockquote:before,q:after,q:before{content:""}a{background-color:transparent}a img{border:0}body,button,input,select,textarea{font-family:-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-weight:400;text-transform:none;font-size:17px;line-height:1.5}p{margin-bottom:1.5em}h1,h2,h3,h4,h5,h6{font-family:inherit;font-size:100%;font-style:inherit;font-weight:inherit}pre{background:rgba(0,0,0,.05);font-family:inherit;font-size:inherit;line-height:normal;margin-bottom:1.5em;padding:20px;overflow:auto;max-width:100%}blockquote{border-left:5px solid rgba(0,0,0,.05);padding:20px;font-size:1.2em;font-style:italic;margin:0 0 1.5em;position:relative}blockquote p:last-child{margin:0}table,td,th{border:1px solid rgba(0,0,0,.1)}table{border-collapse:separate;border-spacing:0;border-width:1px 0 0 1px;margin:0 0 1.5em;width:100%}td,th{padding:8px}th{border-width:0 1px 1px 0}td{border-width:0 1px 1px 0}hr{background-color:rgba(0,0,0,.1);border:0;height:1px;margin-bottom:40px;margin-top:40px}fieldset{padding:0;border:0;min-width:inherit}fieldset legend{padding:0;margin-bottom:1.5em}h1{font-size:42px;margin-bottom:20px;line-height:1.2em;font-weight:400;text-transform:none}h2{font-size:35px;margin-bottom:20px;line-height:1.2em;font-weight:400;text-transform:none}h3{font-size:29px;margin-bottom:20px;line-height:1.2em;font-weight:400;text-transform:none}h4{font-size:24px}h5{font-size:20px}h4,h5,h6{margin-bottom:20px}ol,ul{margin:0 0 1.5em 3em}ul{list-style:disc}ol{list-style:decimal}li>ol,li>ul{margin-bottom:0;margin-left:1.5em}dt{font-weight:700}dd{margin:0 1.5em 1.5em}b,strong{font-weight:700}cite,dfn,em,i{font-style:italic}address{margin:0 0 1.5em}code,kbd,tt,var{font:15px Monaco,Consolas,"Andale Mono","DejaVu Sans Mono",monospace}abbr,acronym{border-bottom:1px dotted #666;cursor:help}ins,mark{text-decoration:none}sub,sup{font-size:75%;height:0;line-height:0;position:relative;vertical-align:baseline}sup{bottom:1ex}sub{top:.5ex}small{font-size:75%}big{font-size:125%}figure{margin:0}table{margin:0 0 1.5em;width:100%}th{font-weight:700}img{height:auto;max-width:100%}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline}button,html input[type=button],input[type=reset],input[type=submit]{border:1px solid transparent;background:#55555e;cursor:pointer;-webkit-appearance:button;padding:10px 20px;color:#fff}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=search]{-webkit-appearance:textfield;box-sizing:content-box}input[type=search]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input[type=email],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=url],select,textarea{background:#fafafa;color:#666;border:1px solid #ccc;border-radius:0;padding:10px 15px;box-sizing:border-box;max-width:100%}textarea{overflow:auto;vertical-align:top;width:100%}input[type=file]{max-width:100%;box-sizing:border-box}a,button,input{transition:color .1s ease-in-out,background-color .1s ease-in-out}a,a:focus,a:hover,a:visited{text-decoration:none}.button,.wp-block-button .wp-block-button__link{padding:10px 20px;display:inline-block}.wp-block-button .wp-block-button__link{font-size:inherit;line-height:inherit}.using-mouse :focus{outline:0}.using-mouse ::-moz-focus-inner{border:0}.alignleft{float:left;margin-right:1.5em}.alignright{float:right;margin-left:1.5em}.aligncenter{clear:both;display:block;margin:0 auto}.size-auto,.size-full,.size-large,.size-medium,.size-thumbnail{max-width:100%;height:auto}.no-sidebar .entry-content .alignfull{margin-left:calc(-100vw / 2 + 100% / 2);margin-right:calc(-100vw / 2 + 100% / 2);max-width:100vw;width:auto}.screen-reader-text{border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute!important;width:1px;word-wrap:normal!important}.screen-reader-text:focus{background-color:#f1f1f1;border-radius:3px;box-shadow:0 0 2px 2px rgba(0,0,0,.6);clip:auto!important;-webkit-clip-path:none;clip-path:none;color:#21759b;display:block;font-size:.875rem;font-weight:700;height:auto;left:5px;line-height:normal;padding:15px 23px 14px;text-decoration:none;top:5px;width:auto;z-index:100000}#primary[tabindex="-1"]:focus{outline:0}.clear:after,.comment-content:after,.entry-content:after,.inside-footer-widgets:not(.grid-container):after,.inside-header:not(.grid-container):after,.inside-navigation:not(.grid-container):after,.inside-top-bar:not(.grid-container):after,.page-header-content-container:after,.paging-navigation:after,.site-content:after,.site-footer:after,.site-header:after,.site-info:after{content:"";display:table;clear:both}.main-navigation{z-index:100;padding:0;clear:both;display:block}.main-navigation a{display:block;text-decoration:none;font-weight:400;text-transform:none;font-size:15px}.main-navigation ul{list-style:none;margin:0;padding-left:0}.main-navigation .main-nav ul li a{padding-left:20px;padding-right:20px;line-height:60px}.inside-navigation{position:relative}.main-navigation li{float:left;position:relative}.sf-menu>li.menu-item-float-right{float:right!important}.nav-float-right .inside-header .main-navigation{float:right;clear:right}.nav-float-left .inside-header .main-navigation{float:left;clear:left}.nav-aligned-center .main-navigation:not(.toggled) .menu>li,.nav-aligned-right .main-navigation:not(.toggled) .menu>li{float:none;display:inline-block}.nav-aligned-center .main-navigation:not(.toggled) ul,.nav-aligned-right .main-navigation:not(.toggled) ul{letter-spacing:-.31em;font-size:1em}.nav-aligned-center .main-navigation:not(.toggled) ul li,.nav-aligned-right .main-navigation:not(.toggled) ul li{letter-spacing:normal}.nav-aligned-center .main-navigation{text-align:center}.nav-aligned-right .main-navigation{text-align:right}.main-navigation li.search-item{float:right}.main-navigation .mobile-bar-items a{padding-left:20px;padding-right:20px;line-height:60px}.main-navigation ul ul{display:block;box-shadow:1px 1px 0 rgba(0,0,0,.1);float:left;position:absolute;left:-99999px;opacity:0;z-index:99999;width:200px;text-align:left;top:auto;transition:opacity 80ms linear;transition-delay:0s;pointer-events:none;height:0;overflow:hidden}.main-navigation ul ul a{display:block}.main-navigation ul ul li{width:100%}.main-navigation .main-nav ul ul li a{line-height:normal;padding:10px 20px;font-size:14px}.main-navigation .main-nav ul li.menu-item-has-children>a{padding-right:0;position:relative}.main-navigation.sub-menu-left .sub-menu{right:0}.main-navigation:not(.toggled) ul li.sfHover>ul,.main-navigation:not(.toggled) ul li:hover>ul{left:auto;opacity:1;transition-delay:150ms;pointer-events:auto;height:auto;overflow:visible}.main-navigation:not(.toggled) ul ul li.sfHover>ul,.main-navigation:not(.toggled) ul ul li:hover>ul{left:100%;top:0}.main-navigation.sub-menu-left:not(.toggled) ul ul li.sfHover>ul,.main-navigation.sub-menu-left:not(.toggled) ul ul li:hover>ul{right:100%;left:auto}.nav-float-right .main-navigation ul ul ul{top:0}.menu-item-has-children .dropdown-menu-toggle{display:inline-block;height:100%;clear:both;padding-right:20px;padding-left:10px}.menu-item-has-children ul .dropdown-menu-toggle{padding-top:10px;padding-bottom:10px;margin-top:-10px}.sidebar .menu-item-has-children .dropdown-menu-toggle,nav ul ul .menu-item-has-children .dropdown-menu-toggle{float:right}.widget-area .main-navigation li{float:none;display:block;width:100%;padding:0;margin:0}.sidebar .main-navigation.sub-menu-right ul li.sfHover ul,.sidebar .main-navigation.sub-menu-right ul li:hover ul{top:0;left:100%}.sidebar .main-navigation.sub-menu-left ul li.sfHover ul,.sidebar .main-navigation.sub-menu-left ul li:hover ul{top:0;right:100%}.site-main .comment-navigation,.site-main .post-navigation,.site-main .posts-navigation{margin:0 0 2em;overflow:hidden}.site-main .post-navigation{margin-bottom:0}.paging-navigation .nav-next,.paging-navigation .nav-previous{display:none}.paging-navigation .nav-links>*{padding:0 5px}.paging-navigation .nav-links .current{font-weight:700}.nav-links>:first-child{padding-left:0}.site-header{position:relative}.inside-header{padding:20px 40px}.main-title{margin:0;font-size:25px;line-height:1.2em;word-wrap:break-word;font-weight:700;text-transform:none}.site-description{margin:0;line-height:1.5;font-weight:400;text-transform:none;font-size:15px}.site-logo{display:inline-block;max-width:100%}.site-header .header-image{vertical-align:middle}.header-widget{float:right;overflow:hidden;max-width:50%}.header-widget .widget{padding:0 0 20px;margin-bottom:0}.header-widget .widget:last-child{padding-bottom:0}.header-widget .widget-title{margin-bottom:15px}.nav-float-right .header-widget{position:relative;top:-10px}.nav-float-right .header-widget .widget{padding:0 0 10px}.nav-float-left .inside-header .site-branding,.nav-float-left .inside-header .site-logo{float:right;clear:right}.nav-float-left .inside-header:after{clear:both;content:'';display:table}.nav-float-right .inside-header .site-branding{display:inline-block}.site-branding-container{display:inline-flex;align-items:center;text-align:left}.site-branding-container .site-logo{margin-right:1.5em}.header-aligned-center .site-header{text-align:center}.header-aligned-right .site-header{text-align:right}.header-aligned-right .site-branding-container{text-align:right}.header-aligned-right .site-branding-container .site-logo{order:10;margin-right:0;margin-left:1.5em}.sticky{display:block}.entry-header .gp-icon,.posted-on .updated{display:none}.byline,.entry-header .cat-links,.entry-header .comments-link,.entry-header .tags-links,.group-blog .byline,.single .byline{display:inline}footer.entry-meta .byline,footer.entry-meta .posted-on{display:block}.entry-content:not(:first-child),.entry-summary:not(:first-child),.page-content:not(:first-child){margin-top:2em}.page-links{clear:both;margin:0 0 1.5em}.archive .format-aside .entry-header,.archive .format-status .entry-header,.archive .format-status .entry-meta,.archive .format-status .entry-title,.blog .format-aside .entry-header,.blog .format-status .entry-header,.blog .format-status .entry-meta,.blog .format-status .entry-title{display:none}.archive .format-aside .entry-content,.archive .format-status .entry-content,.blog .format-aside .entry-content,.blog .format-status .entry-content{margin-top:0}.archive .format-status .entry-content p:last-child,.blog .format-status .entry-content p:last-child{margin-bottom:0}.entry-header,.site-content{word-wrap:break-word}.entry-title{margin-bottom:0}.author .page-header .page-title{display:flex;align-items:center}.author .page-header .avatar{margin-right:20px}.page-header .author-info>:last-child,.page-header>:last-child{margin-bottom:0}.entry-meta{font-size:85%;margin-top:.5em;line-height:1.5}footer.entry-meta{margin-top:2em}.cat-links,.comments-link,.tags-links{display:block}.entry-content>p:last-child,.entry-summary>p:last-child,.page-content>p:last-child,.read-more-container,.taxonomy-description p:last-child{margin-bottom:0}.wp-caption{margin-bottom:1.5em;max-width:100%;position:relative}.wp-caption img[class*=wp-image-]{display:block;margin:0 auto 0;max-width:100%}.wp-caption .wp-caption-text{font-size:75%;padding-top:5px;opacity:.8}.wp-caption img{position:relative;vertical-align:bottom}.wp-block-image figcaption{font-size:13px;text-align:center}.wp-block-gallery,ul.blocks-gallery-grid{margin-left:0}.wp-block-gallery .blocks-gallery-image figcaption,.wp-block-gallery .blocks-gallery-item figcaption{background:rgba(255,255,255,.7);color:#000;padding:10px;box-sizing:border-box}.gallery{margin-bottom:1.5em}.gallery-item{display:inline-block;text-align:center;vertical-align:top;width:100%}.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}.site-main .gallery{margin-bottom:1.5em}.gallery-item img{vertical-align:bottom}.gallery-icon{padding:5px}embed,iframe,object{max-width:100%}.comment-content a{word-wrap:break-word}.bypostauthor{display:block}.comment,.comment-list{list-style-type:none;padding:0;margin:0}.comment-author-info{display:inline-block;vertical-align:middle}.comment-meta .avatar{float:left;margin-right:10px;border-radius:50%}.comment-author cite{font-style:normal;font-weight:700}.entry-meta.comment-metadata{margin-top:0}.comment-content{margin-top:1.5em}.comment-respond{margin-top:0}.comment-form>.form-submit{margin-bottom:0}.comment-form input,.comment-form-comment{margin-bottom:10px}.comment-form #author,.comment-form #email,.comment-form #url{display:block}.comment-metadata .edit-link:before{display:none}.comment-body{padding:30px 0}.comment-content{padding:30px;border:1px solid rgba(0,0,0,.05)}.depth-1.parent>.children{border-bottom:1px solid rgba(0,0,0,.05)}.comment .children{padding-left:30px;margin-top:-30px;border-left:1px solid rgba(0,0,0,.05)}.pingback .comment-body,.trackback .comment-body{border-bottom:1px solid rgba(0,0,0,.05)}.pingback .edit-link{font-size:13px}.comment-content p:last-child{margin-bottom:0}.comment-list>.comment:first-child{padding-top:0;margin-top:0;border-top:0}ol.comment-list{margin-bottom:1.5em}.comment-form-cookies-consent{display:flex;align-items:center}.comment-form-cookies-consent input{margin-right:.5em;margin-bottom:0}.one-container .comments-area{margin-top:1.5em}.comment-content .reply{font-size:85%}#cancel-comment-reply-link{padding-left:10px}.widget-area .widget{padding:40px}.widget select{max-width:100%}.footer-widgets .widget :last-child,.sidebar .widget :last-child{margin-bottom:0}.widget-title{margin-bottom:30px;font-size:20px;line-height:1.5;font-weight:400;text-transform:none}.widget ol,.widget ul{margin:0}.widget .search-field{width:100%}.widget_search .search-submit{display:none}.widget{margin:0 0 30px;box-sizing:border-box}.separate-containers .widget:last-child,.widget:last-child{margin-bottom:0}.footer-widgets .widget,.sidebar .widget{font-size:17px}.widget ul li{list-style-type:none;position:relative;padding-bottom:5px}.widget_categories .children{margin-left:1.5em;padding-top:5px}.widget_categories .children li:last-child{padding-bottom:0}.widget_nav_menu ul ul,.widget_pages ul ul{margin-left:1em;margin-top:5px}.widget ul li.menu-item-has-children,.widget ul li.page_item_has_children{padding-bottom:0}#wp-calendar{table-layout:fixed;font-size:80%}#wp-calendar #prev,#wp-calendar #prev+.pad{border-right:0}.sidebar .grid-container{max-width:100%;width:100%}.post{margin:0 0 2em}.page-header{margin-bottom:30px}.one-container.both-left .inside-left-sidebar,.one-container.both-right .inside-left-sidebar{margin-right:20px}.one-container.both-left .inside-right-sidebar,.one-container.both-right .inside-right-sidebar{margin-left:20px}.one-container:not(.page) .inside-article{padding:0 0 30px 0}.one-container.both-right .site-main,.one-container.right-sidebar .site-main{margin-right:40px}.one-container.both-left .site-main,.one-container.left-sidebar .site-main{margin-left:40px}.one-container.both-sidebars .site-main{margin:0 40px 0 40px}.one-container .site-content{padding:40px}.separate-containers .comments-area,.separate-containers .inside-article,.separate-containers .page-header,.separate-containers .paging-navigation{padding:40px}.separate-containers .page-header,.separate-containers .site-main>*,.separate-containers .widget{margin-bottom:20px}.separate-containers .site-main{margin:20px}.separate-containers.no-sidebar .site-main{margin-left:0;margin-right:0}.separate-containers.both-right .site-main,.separate-containers.right-sidebar .site-main{margin-left:0}.separate-containers.both-left .site-main,.separate-containers.left-sidebar .site-main{margin-right:0}.separate-containers.both-left .inside-left-sidebar,.separate-containers.both-right .inside-left-sidebar{margin-right:10px}.separate-containers.both-left .inside-right-sidebar,.separate-containers.both-right .inside-right-sidebar{margin-left:10px}.separate-containers .inside-left-sidebar,.separate-containers .inside-right-sidebar{margin-top:20px;margin-bottom:20px}.inside-page-header{padding:40px}.widget-area .main-navigation{margin-bottom:20px}.one-container .site-main>:last-child,.separate-containers .site-main>:last-child{margin-bottom:0}.full-width-content .container.grid-container{max-width:100%}.full-width-content.no-sidebar.separate-containers .site-main{margin:0}.full-width-content.one-container .site-content,.full-width-content.separate-containers .inside-article{padding:0}.full-width-content .entry-content .alignwide{margin-left:0;width:auto;max-width:unset}.contained-content.one-container .site-content,.contained-content.separate-containers .inside-article{padding:0}.site-info{text-align:center;font-size:15px}.site-info{padding:20px 40px}.footer-widgets{padding:40px}.site-footer .footer-widgets-container .inner-padding{padding:0 0 0 40px}.site-footer .footer-widgets-container .inside-footer-widgets{margin-left:-40px}.footer-bar-active .footer-bar .widget{padding:0}.footer-bar .widget_nav_menu>div>ul{display:inline-block;vertical-align:top}.footer-bar .widget_nav_menu li{margin:0 10px;float:left;padding:0}.footer-bar .widget_nav_menu li:first-child{margin-left:0}.footer-bar .widget_nav_menu li:last-child{margin-right:0}.footer-bar .widget_nav_menu li ul{display:none}.footer-bar .textwidget p:last-child{margin:0}.footer-bar .widget-title{display:none}.footer-bar-align-right .copyright-bar{float:left}.footer-bar-align-right .footer-bar{float:right;text-align:right}.footer-bar-align-left .copyright-bar{float:right;text-align:right}.footer-bar-align-left .footer-bar{float:left;text-align:left}.footer-bar-align-center .copyright-bar{float:none;text-align:center}.footer-bar-align-center .footer-bar{float:none;text-align:center;margin-bottom:10px}.post-image:not(:first-child){margin-top:2em}.page-header-image,.page-header-image-single{line-height:0}.one-container .inside-article>[class*=page-header-],.separate-containers .inside-article>[class*=page-header-]{margin-bottom:2em;margin-top:0}.inside-article .page-header-image-single.page-header-below-title{margin-top:2em}.separate-containers .page-header-contained,.separate-containers .page-header-content,.separate-containers .page-header-content-single,.separate-containers .page-header-image,.separate-containers .page-header-image-single{margin-top:20px}.top-bar{font-weight:400;text-transform:none;font-size:13px}.top-bar .inside-top-bar .widget{padding:0;display:inline-block;margin:0}.top-bar .inside-top-bar .textwidget p:last-child{margin:0}.top-bar .widget-title{display:none}.top-bar .widget_nav_menu li{margin:0 10px;float:left;padding:0}.top-bar .widget_nav_menu li:first-child{margin-left:0}.top-bar .widget_nav_menu li:last-child{margin-right:0}.top-bar .widget_nav_menu li ul{display:none}.top-bar .widget_nav_menu>div>ul{display:inline-block;vertical-align:top}.inside-top-bar{padding:10px 40px}.top-bar-align-center{text-align:center}.top-bar-align-center .inside-top-bar .widget:not(:first-child){margin-left:10px}.top-bar-align-center .inside-top-bar .widget:first-child:last-child{display:block}.top-bar-align-right{text-align:right}.top-bar-align-right .inside-top-bar>.widget:nth-child(even){float:left;margin-right:10px}.top-bar-align-right .inside-top-bar>.widget:nth-child(odd){margin-left:10px}.top-bar-align-left .inside-top-bar>.widget:nth-child(odd){float:left;margin-right:10px}.top-bar-align-left .inside-top-bar>.widget:nth-child(even){margin-left:10px;float:right}.gp-icon{display:inline-flex;align-self:center}.gp-icon svg{height:1em;width:1em;top:.125em;position:relative;fill:currentColor}.close-search .icon-search svg:nth-child(1),.icon-menu-bars svg:nth-child(2),.icon-search svg:nth-child(2),.toggled .icon-menu-bars svg:nth-child(1){display:none}.close-search .icon-search svg:nth-child(2),.toggled .icon-menu-bars svg:nth-child(2){display:block}.entry-meta .gp-icon{margin-right:.6em;opacity:.7}nav.toggled .icon-arrow-left svg{transform:rotate(-90deg)}nav.toggled .icon-arrow-right svg{transform:rotate(90deg)}nav.toggled .sfHover>a>.dropdown-menu-toggle .gp-icon svg{transform:rotate(180deg)}nav.toggled .sfHover>a>.dropdown-menu-toggle .gp-icon.icon-arrow-left svg{transform:rotate(-270deg)}nav.toggled .sfHover>a>.dropdown-menu-toggle .gp-icon.icon-arrow-right svg{transform:rotate(270deg)}.container.grid-container{width:auto}.infinite-scroll .paging-navigation,.infinite-scroll.neverending .site-footer{display:none}.infinity-end.neverending .site-footer{display:block}.so-panel.widget{padding:0}#mc_embed_signup .clear{display:block;height:auto;visibility:visible;width:auto} \ No newline at end of file diff --git a/wp-content/themes/generatepress/assets/js/a11y.js b/wp-content/themes/generatepress/assets/js/a11y.js index 29099ccc..8d3d3b32 100644 --- a/wp-content/themes/generatepress/assets/js/a11y.js +++ b/wp-content/themes/generatepress/assets/js/a11y.js @@ -1,127 +1,127 @@ -( function() { - 'use strict'; - - if ( 'querySelector' in document && 'addEventListener' in window ) { - var body = document.body; - - body.addEventListener( 'mousedown', function() { - body.classList.add( 'using-mouse' ); - } ); - - body.addEventListener( 'keydown', function() { - body.classList.remove( 'using-mouse' ); - } ); - - if ( body.classList.contains( 'dropdown-hover' ) ) { - var navLinks = document.querySelectorAll( 'nav .main-nav ul a' ), - menuBarItems = document.querySelectorAll( '.menu-bar-items .menu-bar-item > a' ); - - /** - * Make menu items tab accessible when using the hover dropdown type - */ - var toggleFocus = function() { - if ( this.closest( 'nav' ).classList.contains( 'toggled' ) || this.closest( 'nav' ).classList.contains( 'slideout-navigation' ) ) { - return; - } - - var self = this; - - while ( -1 === self.className.indexOf( 'main-nav' ) ) { - if ( 'li' === self.tagName.toLowerCase() ) { - self.classList.toggle( 'sfHover' ); - } - - self = self.parentElement; - } - } - - /** - * Make our menu bar items tab accessible. - */ - var toggleMenuBarItemFocus = function() { - if ( this.closest( 'nav' ).classList.contains( 'toggled' ) || this.closest( 'nav' ).classList.contains( 'slideout-navigation' ) ) { - return; - } - - var self = this; - - while ( -1 === self.className.indexOf( 'menu-bar-items' ) ) { - if ( self.classList.contains( 'menu-bar-item' ) ) { - self.classList.toggle( 'sfHover' ); - } - - self = self.parentElement; - } - } - - for ( var i = 0; i < navLinks.length; i++ ) { - navLinks[i].addEventListener( 'focus', toggleFocus ); - navLinks[i].addEventListener( 'blur', toggleFocus ); - } - - for ( var i = 0; i < menuBarItems.length; i++ ) { - menuBarItems[i].addEventListener( 'focus', toggleMenuBarItemFocus ); - menuBarItems[i].addEventListener( 'blur', toggleMenuBarItemFocus ); - } - } - } - - /** - * Make hover dropdown touch-friendly. - */ - if ( 'ontouchend' in document.documentElement && document.body.classList.contains( 'dropdown-hover' ) ) { - var parentElements = document.querySelectorAll( '.sf-menu .menu-item-has-children' ); - - for ( var i = 0; i < parentElements.length; i++ ) { - parentElements[i].addEventListener( 'touchend', function( e ) { - - // Bail on mobile - if ( this.closest( 'nav' ).classList.contains( 'toggled' ) ) { - return; - } - - if ( e.touches.length === 1 || e.touches.length === 0 ) { - // Prevent touch events within dropdown bubbling down to document - e.stopPropagation(); - - // Toggle hover - if ( ! this.classList.contains( 'sfHover' ) ) { - // Prevent link on first touch - if ( e.target === this || e.target.parentNode === this || e.target.parentNode.parentNode ) { - e.preventDefault(); - } - - var getSiblings = function( elem ) { - return Array.prototype.filter.call( elem.parentNode.children, function( sibling ) { - return sibling !== elem; - } ); - }; - - // Close other sub-menus. - var closestLi = this.closest( 'li' ), - siblings = getSiblings( closestLi ); - - for ( var i = 0; i < siblings.length; i++ ) { - if ( siblings[i].classList.contains( 'sfHover' ) ) { - siblings[i].classList.remove( 'sfHover' ); - } - } - - this.classList.add( 'sfHover' ); - - // Hide dropdown on touch outside - var closeDropdown, - thisItem = this; - - document.addEventListener( 'touchend', closeDropdown = function(e) { - e.stopPropagation(); - - thisItem.classList.remove( 'sfHover' ); - document.removeEventListener( 'touchend', closeDropdown ); - } ); - } - } - } ); - } - } -} )(); +( function() { + 'use strict'; + + if ( 'querySelector' in document && 'addEventListener' in window ) { + var body = document.body; + + body.addEventListener( 'mousedown', function() { + body.classList.add( 'using-mouse' ); + } ); + + body.addEventListener( 'keydown', function() { + body.classList.remove( 'using-mouse' ); + } ); + + if ( body.classList.contains( 'dropdown-hover' ) ) { + var navLinks = document.querySelectorAll( 'nav .main-nav ul a' ), + menuBarItems = document.querySelectorAll( '.menu-bar-items .menu-bar-item > a' ); + + /** + * Make menu items tab accessible when using the hover dropdown type + */ + var toggleFocus = function() { + if ( this.closest( 'nav' ).classList.contains( 'toggled' ) || this.closest( 'nav' ).classList.contains( 'slideout-navigation' ) ) { + return; + } + + var self = this; + + while ( -1 === self.className.indexOf( 'main-nav' ) ) { + if ( 'li' === self.tagName.toLowerCase() ) { + self.classList.toggle( 'sfHover' ); + } + + self = self.parentElement; + } + } + + /** + * Make our menu bar items tab accessible. + */ + var toggleMenuBarItemFocus = function() { + if ( this.closest( 'nav' ).classList.contains( 'toggled' ) || this.closest( 'nav' ).classList.contains( 'slideout-navigation' ) ) { + return; + } + + var self = this; + + while ( -1 === self.className.indexOf( 'menu-bar-items' ) ) { + if ( self.classList.contains( 'menu-bar-item' ) ) { + self.classList.toggle( 'sfHover' ); + } + + self = self.parentElement; + } + } + + for ( var i = 0; i < navLinks.length; i++ ) { + navLinks[i].addEventListener( 'focus', toggleFocus ); + navLinks[i].addEventListener( 'blur', toggleFocus ); + } + + for ( var i = 0; i < menuBarItems.length; i++ ) { + menuBarItems[i].addEventListener( 'focus', toggleMenuBarItemFocus ); + menuBarItems[i].addEventListener( 'blur', toggleMenuBarItemFocus ); + } + } + } + + /** + * Make hover dropdown touch-friendly. + */ + if ( 'ontouchend' in document.documentElement && document.body.classList.contains( 'dropdown-hover' ) ) { + var parentElements = document.querySelectorAll( '.sf-menu .menu-item-has-children' ); + + for ( var i = 0; i < parentElements.length; i++ ) { + parentElements[i].addEventListener( 'touchend', function( e ) { + + // Bail on mobile + if ( this.closest( 'nav' ).classList.contains( 'toggled' ) ) { + return; + } + + if ( e.touches.length === 1 || e.touches.length === 0 ) { + // Prevent touch events within dropdown bubbling down to document + e.stopPropagation(); + + // Toggle hover + if ( ! this.classList.contains( 'sfHover' ) ) { + // Prevent link on first touch + if ( e.target === this || e.target.parentNode === this || e.target.parentNode.parentNode ) { + e.preventDefault(); + } + + var getSiblings = function( elem ) { + return Array.prototype.filter.call( elem.parentNode.children, function( sibling ) { + return sibling !== elem; + } ); + }; + + // Close other sub-menus. + var closestLi = this.closest( 'li' ), + siblings = getSiblings( closestLi ); + + for ( var i = 0; i < siblings.length; i++ ) { + if ( siblings[i].classList.contains( 'sfHover' ) ) { + siblings[i].classList.remove( 'sfHover' ); + } + } + + this.classList.add( 'sfHover' ); + + // Hide dropdown on touch outside + var closeDropdown, + thisItem = this; + + document.addEventListener( 'touchend', closeDropdown = function(e) { + e.stopPropagation(); + + thisItem.classList.remove( 'sfHover' ); + document.removeEventListener( 'touchend', closeDropdown ); + } ); + } + } + } ); + } + } +} )(); diff --git a/wp-content/themes/generatepress/assets/js/back-to-top.js b/wp-content/themes/generatepress/assets/js/back-to-top.js index 2dcc8bba..27ac76cb 100644 --- a/wp-content/themes/generatepress/assets/js/back-to-top.js +++ b/wp-content/themes/generatepress/assets/js/back-to-top.js @@ -1,65 +1,65 @@ -( function() { - 'use strict'; - - // Feature Test - if ( 'querySelector' in document && 'addEventListener' in window ) { - - var goTopBtn = document.querySelector( '.generate-back-to-top' ); - - var trackScroll = function() { - var scrolled = window.pageYOffset; - var coords = goTopBtn.getAttribute( 'data-start-scroll' ) ; - - if ( scrolled > coords ) { - goTopBtn.style.opacity = '1'; - goTopBtn.style.visibility = 'visible'; - } - - if (scrolled < coords) { - goTopBtn.style.opacity = '0'; - goTopBtn.style.visibility = 'hidden'; - } - }; - - // Function to animate the scroll - var smoothScroll = function (anchor, duration) { - // Calculate how far and how fast to scroll - var startLocation = window.pageYOffset; - var endLocation = document.body.offsetTop; - var distance = endLocation - startLocation; - var increments = distance/(duration/16); - var stopAnimation; - - // Scroll the page by an increment, and check if it's time to stop - var animateScroll = function () { - window.scrollBy(0, increments); - stopAnimation(); - }; - - // Stop animation when you reach the anchor OR the top of the page - stopAnimation = function () { - var travelled = window.pageYOffset; - if ( travelled <= (endLocation || 0) ) { - clearInterval(runAnimation); - document.activeElement.blur(); - } - }; - - // Loop the animation function - var runAnimation = setInterval(animateScroll, 16); - }; - - if ( goTopBtn ) { - // Show the button when scrolling down. - window.addEventListener( 'scroll', trackScroll ); - - // Scroll back to top when clicked. - goTopBtn.addEventListener( 'click', function( e ) { - e.preventDefault(); - smoothScroll( document.body, goTopBtn.getAttribute( 'data-scroll-speed' ) || 400 ); - }, false ); - } - - } - - } )(); +( function() { + 'use strict'; + + // Feature Test + if ( 'querySelector' in document && 'addEventListener' in window ) { + + var goTopBtn = document.querySelector( '.generate-back-to-top' ); + + var trackScroll = function() { + var scrolled = window.pageYOffset; + var coords = goTopBtn.getAttribute( 'data-start-scroll' ) ; + + if ( scrolled > coords ) { + goTopBtn.style.opacity = '1'; + goTopBtn.style.visibility = 'visible'; + } + + if (scrolled < coords) { + goTopBtn.style.opacity = '0'; + goTopBtn.style.visibility = 'hidden'; + } + }; + + // Function to animate the scroll + var smoothScroll = function (anchor, duration) { + // Calculate how far and how fast to scroll + var startLocation = window.pageYOffset; + var endLocation = document.body.offsetTop; + var distance = endLocation - startLocation; + var increments = distance/(duration/16); + var stopAnimation; + + // Scroll the page by an increment, and check if it's time to stop + var animateScroll = function () { + window.scrollBy(0, increments); + stopAnimation(); + }; + + // Stop animation when you reach the anchor OR the top of the page + stopAnimation = function () { + var travelled = window.pageYOffset; + if ( travelled <= (endLocation || 0) ) { + clearInterval(runAnimation); + document.activeElement.blur(); + } + }; + + // Loop the animation function + var runAnimation = setInterval(animateScroll, 16); + }; + + if ( goTopBtn ) { + // Show the button when scrolling down. + window.addEventListener( 'scroll', trackScroll ); + + // Scroll back to top when clicked. + goTopBtn.addEventListener( 'click', function( e ) { + e.preventDefault(); + smoothScroll( document.body, goTopBtn.getAttribute( 'data-scroll-speed' ) || 400 ); + }, false ); + } + + } + + } )(); diff --git a/wp-content/themes/generatepress/assets/js/dropdown-click.js b/wp-content/themes/generatepress/assets/js/dropdown-click.js index bf229b97..dff8bbf2 100644 --- a/wp-content/themes/generatepress/assets/js/dropdown-click.js +++ b/wp-content/themes/generatepress/assets/js/dropdown-click.js @@ -1,124 +1,124 @@ -( function() { - 'use strict'; - - if ( 'querySelector' in document && 'addEventListener' in window ) { - var body = document.body; - /** - * Dropdown click - * - * @param e The event. - * @param _this The clicked item. - */ - var dropdownClick = function( e, _this ) { - e.preventDefault(); - e.stopPropagation(); - - if ( ! _this ) { - var _this = this; - } - - var closestLi = _this.closest( 'li' ); - - // Close other sub-menus - var openedSubMenus = _this.closest( 'nav' ).querySelectorAll( 'ul.toggled-on' ); - if ( openedSubMenus && ! _this.closest( 'ul' ).classList.contains( 'toggled-on' ) && ! _this.closest( 'li' ).classList.contains( 'sfHover' ) ) { - for ( var o = 0; o < openedSubMenus.length; o++ ) { - openedSubMenus[o].classList.remove( 'toggled-on' ); - openedSubMenus[o].closest( 'li' ).classList.remove( 'sfHover' ); - } - } - - // Add sfHover class to parent li - closestLi.classList.toggle( 'sfHover' ); - - // Set aria-expanded on arrow - var dropdownToggle = closestLi.querySelector( '.dropdown-menu-toggle' ); - if ( 'false' === dropdownToggle.getAttribute( 'aria-expanded' ) || ! dropdownToggle.getAttribute( 'aria-expanded' ) ) { - dropdownToggle.setAttribute( 'aria-expanded', 'true' ); - } else { - dropdownToggle.setAttribute( 'aria-expanded', 'false' ); - } - - if ( closestLi.querySelector( '.sub-menu' ) ) { - var subMenuSelector = '.sub-menu'; - } else { - var subMenuSelector = '.children'; - } - - // Open the sub-menu - if ( body.classList.contains( 'dropdown-click-menu-item' ) ) { - _this.parentNode.querySelector( subMenuSelector ).classList.toggle( 'toggled-on' ); - } else if ( body.classList.contains( 'dropdown-click-arrow' ) ) { - closestLi.querySelector( subMenuSelector ).classList.toggle( 'toggled-on' ); - } - } - - // Do stuff if click dropdown if enabled - var parentElementLinks = document.querySelectorAll( '.main-nav .menu-item-has-children > a' ); - - // Open the sub-menu by clicking on the entire link element - if ( body.classList.contains( 'dropdown-click-menu-item' ) ) { - for ( var i = 0; i < parentElementLinks.length; i++ ) { - parentElementLinks[i].addEventListener( 'click', dropdownClick, true ); - } - } - - // Open the sub-menu by clicking on a dropdown arrow - if ( body.classList.contains( 'dropdown-click-arrow' ) ) { - // Add a class to sub-menu items that are set to # - for ( var i = 0; i < document.querySelectorAll( '.main-nav .menu-item-has-children > a' ).length; i++ ) { - if ( '#' == document.querySelectorAll( '.main-nav .menu-item-has-children > a' )[i].getAttribute( 'href' ) ) { - document.querySelectorAll( '.main-nav .menu-item-has-children > a' )[i].classList.add( 'menu-item-dropdown-click' ); - } - } - - var dropdownToggleLinks = document.querySelectorAll( '.main-nav .menu-item-has-children > a .dropdown-menu-toggle' ); - for ( var i = 0; i < dropdownToggleLinks.length; i++ ) { - dropdownToggleLinks[i].addEventListener( 'click', dropdownClick, false ); - - dropdownToggleLinks[i].addEventListener( 'keydown', function( e ) { - var _this = this; - var key = e.which || e.keyCode; - if ( key === 13 ) { // 13 is enter - dropdownClick( e, _this ); - } - }, false ); - } - - for ( var i = 0; i < document.querySelectorAll( '.main-nav .menu-item-has-children > a.menu-item-dropdown-click' ).length; i++ ) { - document.querySelectorAll( '.main-nav .menu-item-has-children > a.menu-item-dropdown-click' )[i].addEventListener( 'click', dropdownClick, false ); - } - } - - var closeSubMenus = function() { - if ( document.querySelector( 'nav ul .toggled-on' ) ) { - var activeSubMenus = document.querySelectorAll( 'nav ul .toggled-on' ); - var activeDropdownToggles = document.querySelectorAll( 'nav .dropdown-menu-toggle' ); - for ( var i = 0; i < activeSubMenus.length; i++ ) { - activeSubMenus[i].classList.remove( 'toggled-on' ); - activeSubMenus[i].closest( '.sfHover' ).classList.remove( 'sfHover' ); - } - - for ( var i = 0; i < activeDropdownToggles.length; i++ ) { - activeDropdownToggles[i].setAttribute( 'aria-expanded', 'false' ); - } - } - } - - // Close sub-menus when clicking elsewhere - document.addEventListener( 'click', function ( event ) { - if ( ! event.target.closest( '.sfHover' ) ) { - closeSubMenus(); - } - }, false); - - // Close sub-menus on escape key - document.addEventListener( 'keydown', function( e ) { - var key = e.which || e.keyCode; - if ( key === 27 ) { // 27 is esc - closeSubMenus(); - } - }, false ); - } - -})(); +( function() { + 'use strict'; + + if ( 'querySelector' in document && 'addEventListener' in window ) { + var body = document.body; + /** + * Dropdown click + * + * @param e The event. + * @param _this The clicked item. + */ + var dropdownClick = function( e, _this ) { + e.preventDefault(); + e.stopPropagation(); + + if ( ! _this ) { + var _this = this; + } + + var closestLi = _this.closest( 'li' ); + + // Close other sub-menus + var openedSubMenus = _this.closest( 'nav' ).querySelectorAll( 'ul.toggled-on' ); + if ( openedSubMenus && ! _this.closest( 'ul' ).classList.contains( 'toggled-on' ) && ! _this.closest( 'li' ).classList.contains( 'sfHover' ) ) { + for ( var o = 0; o < openedSubMenus.length; o++ ) { + openedSubMenus[o].classList.remove( 'toggled-on' ); + openedSubMenus[o].closest( 'li' ).classList.remove( 'sfHover' ); + } + } + + // Add sfHover class to parent li + closestLi.classList.toggle( 'sfHover' ); + + // Set aria-expanded on arrow + var dropdownToggle = closestLi.querySelector( '.dropdown-menu-toggle' ); + if ( 'false' === dropdownToggle.getAttribute( 'aria-expanded' ) || ! dropdownToggle.getAttribute( 'aria-expanded' ) ) { + dropdownToggle.setAttribute( 'aria-expanded', 'true' ); + } else { + dropdownToggle.setAttribute( 'aria-expanded', 'false' ); + } + + if ( closestLi.querySelector( '.sub-menu' ) ) { + var subMenuSelector = '.sub-menu'; + } else { + var subMenuSelector = '.children'; + } + + // Open the sub-menu + if ( body.classList.contains( 'dropdown-click-menu-item' ) ) { + _this.parentNode.querySelector( subMenuSelector ).classList.toggle( 'toggled-on' ); + } else if ( body.classList.contains( 'dropdown-click-arrow' ) ) { + closestLi.querySelector( subMenuSelector ).classList.toggle( 'toggled-on' ); + } + } + + // Do stuff if click dropdown if enabled + var parentElementLinks = document.querySelectorAll( '.main-nav .menu-item-has-children > a' ); + + // Open the sub-menu by clicking on the entire link element + if ( body.classList.contains( 'dropdown-click-menu-item' ) ) { + for ( var i = 0; i < parentElementLinks.length; i++ ) { + parentElementLinks[i].addEventListener( 'click', dropdownClick, true ); + } + } + + // Open the sub-menu by clicking on a dropdown arrow + if ( body.classList.contains( 'dropdown-click-arrow' ) ) { + // Add a class to sub-menu items that are set to # + for ( var i = 0; i < document.querySelectorAll( '.main-nav .menu-item-has-children > a' ).length; i++ ) { + if ( '#' == document.querySelectorAll( '.main-nav .menu-item-has-children > a' )[i].getAttribute( 'href' ) ) { + document.querySelectorAll( '.main-nav .menu-item-has-children > a' )[i].classList.add( 'menu-item-dropdown-click' ); + } + } + + var dropdownToggleLinks = document.querySelectorAll( '.main-nav .menu-item-has-children > a .dropdown-menu-toggle' ); + for ( var i = 0; i < dropdownToggleLinks.length; i++ ) { + dropdownToggleLinks[i].addEventListener( 'click', dropdownClick, false ); + + dropdownToggleLinks[i].addEventListener( 'keydown', function( e ) { + var _this = this; + var key = e.which || e.keyCode; + if ( key === 13 ) { // 13 is enter + dropdownClick( e, _this ); + } + }, false ); + } + + for ( var i = 0; i < document.querySelectorAll( '.main-nav .menu-item-has-children > a.menu-item-dropdown-click' ).length; i++ ) { + document.querySelectorAll( '.main-nav .menu-item-has-children > a.menu-item-dropdown-click' )[i].addEventListener( 'click', dropdownClick, false ); + } + } + + var closeSubMenus = function() { + if ( document.querySelector( 'nav ul .toggled-on' ) ) { + var activeSubMenus = document.querySelectorAll( 'nav ul .toggled-on' ); + var activeDropdownToggles = document.querySelectorAll( 'nav .dropdown-menu-toggle' ); + for ( var i = 0; i < activeSubMenus.length; i++ ) { + activeSubMenus[i].classList.remove( 'toggled-on' ); + activeSubMenus[i].closest( '.sfHover' ).classList.remove( 'sfHover' ); + } + + for ( var i = 0; i < activeDropdownToggles.length; i++ ) { + activeDropdownToggles[i].setAttribute( 'aria-expanded', 'false' ); + } + } + } + + // Close sub-menus when clicking elsewhere + document.addEventListener( 'click', function ( event ) { + if ( ! event.target.closest( '.sfHover' ) ) { + closeSubMenus(); + } + }, false); + + // Close sub-menus on escape key + document.addEventListener( 'keydown', function( e ) { + var key = e.which || e.keyCode; + if ( key === 27 ) { // 27 is esc + closeSubMenus(); + } + }, false ); + } + +})(); diff --git a/wp-content/themes/generatepress/assets/js/main.js b/wp-content/themes/generatepress/assets/js/main.js index 1a0f18e1..115c20d2 100644 --- a/wp-content/themes/generatepress/assets/js/main.js +++ b/wp-content/themes/generatepress/assets/js/main.js @@ -1,430 +1,430 @@ -( function() { - 'use strict'; - - if ( 'querySelector' in document && 'addEventListener' in window ) { - /** - * matches() pollyfil - * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/closest#Browser_compatibility - */ - if ( ! Element.prototype.matches ) { - Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector; - } - - /** - * closest() pollyfil - * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/closest#Browser_compatibility - */ - if ( ! Element.prototype.closest ) { - Element.prototype.closest = function( s ) { - var el = this; - var ancestor = this; - if ( ! document.documentElement.contains( el ) ) { - return null; - } - do { - if ( ancestor.matches( s ) ) { - return ancestor; - } - ancestor = ancestor.parentElement; - } while ( ancestor !== null ); - return null; - }; - } - - var getSiblings = function( elem ) { - return Array.prototype.filter.call( elem.parentNode.children, function( sibling ) { - return sibling !== elem; - } ); - }; - - var allNavToggles = document.querySelectorAll( '.menu-toggle' ), - dropdownToggle = document.querySelectorAll( 'nav .dropdown-menu-toggle' ), - navLinks = document.querySelectorAll( 'nav ul a' ), - mobileMenuControls = document.querySelector( '.mobile-menu-control-wrapper' ), - body = document.body, - htmlEl = document.documentElement; - - var enableDropdownArrows = function( nav ) { - if ( body.classList.contains( 'dropdown-hover' ) ) { - var dropdownItems = nav.querySelectorAll( 'li.menu-item-has-children' ); - - for ( var i = 0; i < dropdownItems.length; i++ ) { - dropdownItems[i].querySelector( '.dropdown-menu-toggle' ).setAttribute( 'tabindex', '0' ); - dropdownItems[i].querySelector( '.dropdown-menu-toggle' ).setAttribute( 'role', 'button' ); - dropdownItems[i].querySelector( '.dropdown-menu-toggle' ).setAttribute( 'aria-expanded', 'false' ); - dropdownItems[i].querySelector( '.dropdown-menu-toggle' ).setAttribute( 'aria-label', generatepressMenu.openSubMenuLabel ); - } - } - }; - - var disableDropdownArrows = function( nav ) { - if ( body.classList.contains( 'dropdown-hover' ) ) { - var dropdownItems = nav.querySelectorAll( 'li.menu-item-has-children' ); - - for ( var i = 0; i < dropdownItems.length; i++ ) { - dropdownItems[i].querySelector( '.dropdown-menu-toggle' ).removeAttribute( 'tabindex' ); - dropdownItems[i].querySelector( '.dropdown-menu-toggle' ).setAttribute( 'role', 'presentation' ); - dropdownItems[i].querySelector( '.dropdown-menu-toggle' ).removeAttribute( 'aria-expanded' ); - dropdownItems[i].querySelector( '.dropdown-menu-toggle' ).removeAttribute( 'aria-label' ); - } - } - }; - - var setDropdownArrowAttributes = function( arrow ) { - if ( 'false' === arrow.getAttribute( 'aria-expanded' ) || ! arrow.getAttribute( 'aria-expanded' ) ) { - arrow.setAttribute( 'aria-expanded', 'true' ); - arrow.setAttribute( 'aria-label', generatepressMenu.closeSubMenuLabel ); - } else { - arrow.setAttribute( 'aria-expanded', 'false' ); - arrow.setAttribute( 'aria-label', generatepressMenu.openSubMenuLabel ); - } - }; - - /** - * Start mobile menu toggle. - * - * @param e The event. - * @param _this The clicked item. - */ - var toggleNav = function( e, _this ) { - if ( ! _this ) { - var _this = this; - } - - var parentContainer = ''; - - if ( _this.getAttribute( 'data-nav' ) ) { - parentContainer = document.getElementById( _this.getAttribute( 'data-nav' ) ); - } else { - parentContainer = document.getElementById( _this.closest( 'nav' ).getAttribute( 'id' ) ); - } - - if ( ! parentContainer ) { - return; - } - - var isExternalToggle = false; - - if ( _this.closest( '.mobile-menu-control-wrapper' ) ) { - isExternalToggle = true; - } - - var nav = parentContainer.getElementsByTagName( 'ul' )[0]; - - if ( parentContainer.classList.contains( 'toggled' ) ) { - parentContainer.classList.remove( 'toggled' ); - htmlEl.classList.remove( 'mobile-menu-open' ); - nav.setAttribute( 'aria-hidden', 'true' ); - _this.setAttribute( 'aria-expanded', 'false' ); - - if ( isExternalToggle ) { - mobileMenuControls.classList.remove( 'toggled' ); - } else if ( mobileMenuControls && parentContainer.classList.contains( 'main-navigation' ) ) { - mobileMenuControls.classList.remove( 'toggled' ); - } - - disableDropdownArrows( nav ); - } else { - parentContainer.classList.add( 'toggled' ); - htmlEl.classList.add( 'mobile-menu-open' ); - nav.setAttribute( 'aria-hidden', 'false' ); - _this.setAttribute( 'aria-expanded', 'true' ); - - if ( isExternalToggle ) { - mobileMenuControls.classList.add( 'toggled' ); - - if ( mobileMenuControls.querySelector( '.search-item' ) ) { - if ( mobileMenuControls.querySelector( '.search-item' ).classList.contains( 'active' ) ) { - mobileMenuControls.querySelector( '.search-item' ).click(); - } - } - } else if ( mobileMenuControls && parentContainer.classList.contains( 'main-navigation' ) ) { - mobileMenuControls.classList.add( 'toggled' ); - } - - enableDropdownArrows( nav ); - } - } - - for ( var i = 0; i < allNavToggles.length; i++ ) { - allNavToggles[i].addEventListener( 'click', toggleNav, false ); - } - - /** - * Open sub-menus - * - * @param e The event. - * @param _this The clicked item. - */ - var toggleSubNav = function( e, _this ) { - - if ( ! _this ) { - var _this = this; - } - - if ( ( _this.closest( 'nav' ).classList.contains( 'toggled' ) || htmlEl.classList.contains( 'slide-opened' ) ) && ! body.classList.contains( 'dropdown-click' ) ) { - e.preventDefault(); - var closestLi = _this.closest( 'li' ); - - setDropdownArrowAttributes( closestLi.querySelector( '.dropdown-menu-toggle' ) ); - - if ( closestLi.querySelector( '.sub-menu' ) ) { - var subMenu = closestLi.querySelector( '.sub-menu' ); - } else { - var subMenu = closestLi.querySelector( '.children' ); - } - - if ( generatepressMenu.toggleOpenedSubMenus ) { - var siblings = getSiblings( closestLi ); - - for ( var i = 0; i < siblings.length; i++ ) { - if ( siblings[i].classList.contains( 'sfHover' ) ) { - siblings[i].classList.remove( 'sfHover' ); - siblings[i].querySelector( '.toggled-on' ).classList.remove( 'toggled-on' ); - setDropdownArrowAttributes( siblings[i].querySelector( '.dropdown-menu-toggle' ) ); - } - } - } - - closestLi.classList.toggle( 'sfHover' ); - subMenu.classList.toggle( 'toggled-on' ); - } - - e.stopPropagation(); - } - - for ( var i = 0; i < dropdownToggle.length; i++ ) { - dropdownToggle[i].addEventListener( 'click', toggleSubNav, false ); - dropdownToggle[i].addEventListener( 'keypress', function( e ) { - var key = e.which || e.keyCode; - if (key === 13) { // 13 is enter - toggleSubNav( e, this ); - } - }, false ); - } - - /** - * Disable the mobile menu if our toggle isn't visible. - * Makes it possible to style mobile item with .toggled class. - */ - var checkMobile = function() { - var openedMobileMenus = document.querySelectorAll( '.toggled, .has-active-search' ); - - for ( var i = 0; i < openedMobileMenus.length; i++ ) { - var menuToggle = openedMobileMenus[i].querySelector( '.menu-toggle' ); - - if ( mobileMenuControls && ! menuToggle.closest( 'nav' ).classList.contains( 'mobile-menu-control-wrapper' ) ) { - menuToggle = mobileMenuControls.querySelector( '.menu-toggle' ); - } - - if ( menuToggle && menuToggle.offsetParent === null ) { - if ( openedMobileMenus[i].classList.contains( 'toggled' ) ) { - var remoteNav = false; - - if ( openedMobileMenus[i].classList.contains( 'mobile-menu-control-wrapper' ) ) { - remoteNav = true; - } - - if ( ! remoteNav ) { - // Navigation is toggled, but .menu-toggle isn't visible on the page (display: none). - var closestNav = openedMobileMenus[i].getElementsByTagName( 'ul' )[ 0 ], - closestNavItems = closestNav.getElementsByTagName( 'li' ), - closestSubMenus = closestNav.getElementsByTagName( 'ul' ); - } - - document.activeElement.blur(); - openedMobileMenus[i].classList.remove( 'toggled' ); - - htmlEl.classList.remove( 'mobile-menu-open' ); - menuToggle.setAttribute( 'aria-expanded', 'false' ); - - if ( ! remoteNav ) { - for ( var li = 0; li < closestNavItems.length; li++ ) { - closestNavItems[li].classList.remove( 'sfHover' ); - } - - for ( var sm = 0; sm < closestSubMenus.length; sm++ ) { - closestSubMenus[sm].classList.remove( 'toggled-on' ); - } - - if ( closestNav ) { - closestNav.removeAttribute( 'aria-hidden' ); - } - } - - disableDropdownArrows( openedMobileMenus[i] ); - } - - if ( mobileMenuControls.querySelector( '.search-item' ) ) { - if ( mobileMenuControls.querySelector( '.search-item' ).classList.contains( 'active' ) ) { - mobileMenuControls.querySelector( '.search-item' ).click(); - } - } - } - } - } - window.addEventListener( 'resize', checkMobile, false ); - window.addEventListener( 'orientationchange', checkMobile, false ); - - if ( body.classList.contains( 'dropdown-hover' ) ) { - /** - * Do some essential things when menu items are clicked. - */ - for ( var i = 0; i < navLinks.length; i++ ) { - navLinks[i].addEventListener( 'click', function( e ) { - // Remove sfHover class if we're going to another site. - if ( this.hostname !== window.location.hostname ) { - document.activeElement.blur(); - } - - var closest_nav = this.closest( 'nav' ); - if ( closest_nav.classList.contains( 'toggled' ) || htmlEl.classList.contains( 'slide-opened' ) ) { - var url = this.getAttribute( 'href' ); - - // Open the sub-menu if the link has no destination - if ( '#' == url || '' == url ) { - e.preventDefault(); - var closestLi = this.closest( 'li' ); - closestLi.classList.toggle( 'sfHover' ); - var subMenu = closestLi.querySelector( '.sub-menu' ); - - if ( subMenu ) { - subMenu.classList.toggle( 'toggled-on' ); - } - } - } - }, false ); - } - } - - } - -})(); - -( function() { - 'use strict'; - - if ( 'querySelector' in document && 'addEventListener' in window ) { - var body = document.body; - - body.addEventListener( 'mousedown', function() { - body.classList.add( 'using-mouse' ); - } ); - - body.addEventListener( 'keydown', function() { - body.classList.remove( 'using-mouse' ); - } ); - - if ( body.classList.contains( 'dropdown-hover' ) ) { - var navLinks = document.querySelectorAll( 'nav .main-nav ul a' ), - menuBarItems = document.querySelectorAll( '.menu-bar-items .menu-bar-item > a' ); - - /** - * Make menu items tab accessible when using the hover dropdown type - */ - var toggleFocus = function() { - if ( this.closest( 'nav' ).classList.contains( 'toggled' ) || this.closest( 'nav' ).classList.contains( 'slideout-navigation' ) ) { - return; - } - - var self = this; - - while ( -1 === self.className.indexOf( 'main-nav' ) ) { - if ( 'li' === self.tagName.toLowerCase() ) { - self.classList.toggle( 'sfHover' ); - } - - self = self.parentElement; - } - } - - /** - * Make our menu bar items tab accessible. - */ - var toggleMenuBarItemFocus = function() { - if ( this.closest( 'nav' ).classList.contains( 'toggled' ) || this.closest( 'nav' ).classList.contains( 'slideout-navigation' ) ) { - return; - } - - var self = this; - - while ( -1 === self.className.indexOf( 'menu-bar-items' ) ) { - if ( self.classList.contains( 'menu-bar-item' ) ) { - self.classList.toggle( 'sfHover' ); - } - - self = self.parentElement; - } - } - - for ( var i = 0; i < navLinks.length; i++ ) { - navLinks[i].addEventListener( 'focus', toggleFocus ); - navLinks[i].addEventListener( 'blur', toggleFocus ); - } - - for ( var i = 0; i < menuBarItems.length; i++ ) { - menuBarItems[i].addEventListener( 'focus', toggleMenuBarItemFocus ); - menuBarItems[i].addEventListener( 'blur', toggleMenuBarItemFocus ); - } - } - } - - /** - * Make hover dropdown touch-friendly. - */ - if ( 'ontouchend' in document.documentElement && document.body.classList.contains( 'dropdown-hover' ) ) { - var parentElements = document.querySelectorAll( '.sf-menu .menu-item-has-children' ); - - for ( var i = 0; i < parentElements.length; i++ ) { - parentElements[i].addEventListener( 'touchend', function( e ) { - - // Bail on mobile - if ( this.closest( 'nav' ).classList.contains( 'toggled' ) ) { - return; - } - - if ( e.touches.length === 1 || e.touches.length === 0 ) { - // Prevent touch events within dropdown bubbling down to document - e.stopPropagation(); - - // Toggle hover - if ( ! this.classList.contains( 'sfHover' ) ) { - // Prevent link on first touch - if ( e.target === this || e.target.parentNode === this || e.target.parentNode.parentNode ) { - e.preventDefault(); - } - - var getSiblings = function( elem ) { - return Array.prototype.filter.call( elem.parentNode.children, function( sibling ) { - return sibling !== elem; - } ); - }; - - // Close other sub-menus. - var closestLi = this.closest( 'li' ), - siblings = getSiblings( closestLi ); - - for ( var i = 0; i < siblings.length; i++ ) { - if ( siblings[i].classList.contains( 'sfHover' ) ) { - siblings[i].classList.remove( 'sfHover' ); - } - } - - this.classList.add( 'sfHover' ); - - // Hide dropdown on touch outside - var closeDropdown, - thisItem = this; - - document.addEventListener( 'touchend', closeDropdown = function(e) { - e.stopPropagation(); - - thisItem.classList.remove( 'sfHover' ); - document.removeEventListener( 'touchend', closeDropdown ); - } ); - } - } - } ); - } - } -} )(); +( function() { + 'use strict'; + + if ( 'querySelector' in document && 'addEventListener' in window ) { + /** + * matches() pollyfil + * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/closest#Browser_compatibility + */ + if ( ! Element.prototype.matches ) { + Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector; + } + + /** + * closest() pollyfil + * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/closest#Browser_compatibility + */ + if ( ! Element.prototype.closest ) { + Element.prototype.closest = function( s ) { + var el = this; + var ancestor = this; + if ( ! document.documentElement.contains( el ) ) { + return null; + } + do { + if ( ancestor.matches( s ) ) { + return ancestor; + } + ancestor = ancestor.parentElement; + } while ( ancestor !== null ); + return null; + }; + } + + var getSiblings = function( elem ) { + return Array.prototype.filter.call( elem.parentNode.children, function( sibling ) { + return sibling !== elem; + } ); + }; + + var allNavToggles = document.querySelectorAll( '.menu-toggle' ), + dropdownToggle = document.querySelectorAll( 'nav .dropdown-menu-toggle' ), + navLinks = document.querySelectorAll( 'nav ul a' ), + mobileMenuControls = document.querySelector( '.mobile-menu-control-wrapper' ), + body = document.body, + htmlEl = document.documentElement; + + var enableDropdownArrows = function( nav ) { + if ( body.classList.contains( 'dropdown-hover' ) ) { + var dropdownItems = nav.querySelectorAll( 'li.menu-item-has-children' ); + + for ( var i = 0; i < dropdownItems.length; i++ ) { + dropdownItems[i].querySelector( '.dropdown-menu-toggle' ).setAttribute( 'tabindex', '0' ); + dropdownItems[i].querySelector( '.dropdown-menu-toggle' ).setAttribute( 'role', 'button' ); + dropdownItems[i].querySelector( '.dropdown-menu-toggle' ).setAttribute( 'aria-expanded', 'false' ); + dropdownItems[i].querySelector( '.dropdown-menu-toggle' ).setAttribute( 'aria-label', generatepressMenu.openSubMenuLabel ); + } + } + }; + + var disableDropdownArrows = function( nav ) { + if ( body.classList.contains( 'dropdown-hover' ) ) { + var dropdownItems = nav.querySelectorAll( 'li.menu-item-has-children' ); + + for ( var i = 0; i < dropdownItems.length; i++ ) { + dropdownItems[i].querySelector( '.dropdown-menu-toggle' ).removeAttribute( 'tabindex' ); + dropdownItems[i].querySelector( '.dropdown-menu-toggle' ).setAttribute( 'role', 'presentation' ); + dropdownItems[i].querySelector( '.dropdown-menu-toggle' ).removeAttribute( 'aria-expanded' ); + dropdownItems[i].querySelector( '.dropdown-menu-toggle' ).removeAttribute( 'aria-label' ); + } + } + }; + + var setDropdownArrowAttributes = function( arrow ) { + if ( 'false' === arrow.getAttribute( 'aria-expanded' ) || ! arrow.getAttribute( 'aria-expanded' ) ) { + arrow.setAttribute( 'aria-expanded', 'true' ); + arrow.setAttribute( 'aria-label', generatepressMenu.closeSubMenuLabel ); + } else { + arrow.setAttribute( 'aria-expanded', 'false' ); + arrow.setAttribute( 'aria-label', generatepressMenu.openSubMenuLabel ); + } + }; + + /** + * Start mobile menu toggle. + * + * @param e The event. + * @param _this The clicked item. + */ + var toggleNav = function( e, _this ) { + if ( ! _this ) { + var _this = this; + } + + var parentContainer = ''; + + if ( _this.getAttribute( 'data-nav' ) ) { + parentContainer = document.getElementById( _this.getAttribute( 'data-nav' ) ); + } else { + parentContainer = document.getElementById( _this.closest( 'nav' ).getAttribute( 'id' ) ); + } + + if ( ! parentContainer ) { + return; + } + + var isExternalToggle = false; + + if ( _this.closest( '.mobile-menu-control-wrapper' ) ) { + isExternalToggle = true; + } + + var nav = parentContainer.getElementsByTagName( 'ul' )[0]; + + if ( parentContainer.classList.contains( 'toggled' ) ) { + parentContainer.classList.remove( 'toggled' ); + htmlEl.classList.remove( 'mobile-menu-open' ); + nav.setAttribute( 'aria-hidden', 'true' ); + _this.setAttribute( 'aria-expanded', 'false' ); + + if ( isExternalToggle ) { + mobileMenuControls.classList.remove( 'toggled' ); + } else if ( mobileMenuControls && parentContainer.classList.contains( 'main-navigation' ) ) { + mobileMenuControls.classList.remove( 'toggled' ); + } + + disableDropdownArrows( nav ); + } else { + parentContainer.classList.add( 'toggled' ); + htmlEl.classList.add( 'mobile-menu-open' ); + nav.setAttribute( 'aria-hidden', 'false' ); + _this.setAttribute( 'aria-expanded', 'true' ); + + if ( isExternalToggle ) { + mobileMenuControls.classList.add( 'toggled' ); + + if ( mobileMenuControls.querySelector( '.search-item' ) ) { + if ( mobileMenuControls.querySelector( '.search-item' ).classList.contains( 'active' ) ) { + mobileMenuControls.querySelector( '.search-item' ).click(); + } + } + } else if ( mobileMenuControls && parentContainer.classList.contains( 'main-navigation' ) ) { + mobileMenuControls.classList.add( 'toggled' ); + } + + enableDropdownArrows( nav ); + } + } + + for ( var i = 0; i < allNavToggles.length; i++ ) { + allNavToggles[i].addEventListener( 'click', toggleNav, false ); + } + + /** + * Open sub-menus + * + * @param e The event. + * @param _this The clicked item. + */ + var toggleSubNav = function( e, _this ) { + + if ( ! _this ) { + var _this = this; + } + + if ( ( _this.closest( 'nav' ).classList.contains( 'toggled' ) || htmlEl.classList.contains( 'slide-opened' ) ) && ! body.classList.contains( 'dropdown-click' ) ) { + e.preventDefault(); + var closestLi = _this.closest( 'li' ); + + setDropdownArrowAttributes( closestLi.querySelector( '.dropdown-menu-toggle' ) ); + + if ( closestLi.querySelector( '.sub-menu' ) ) { + var subMenu = closestLi.querySelector( '.sub-menu' ); + } else { + var subMenu = closestLi.querySelector( '.children' ); + } + + if ( generatepressMenu.toggleOpenedSubMenus ) { + var siblings = getSiblings( closestLi ); + + for ( var i = 0; i < siblings.length; i++ ) { + if ( siblings[i].classList.contains( 'sfHover' ) ) { + siblings[i].classList.remove( 'sfHover' ); + siblings[i].querySelector( '.toggled-on' ).classList.remove( 'toggled-on' ); + setDropdownArrowAttributes( siblings[i].querySelector( '.dropdown-menu-toggle' ) ); + } + } + } + + closestLi.classList.toggle( 'sfHover' ); + subMenu.classList.toggle( 'toggled-on' ); + } + + e.stopPropagation(); + } + + for ( var i = 0; i < dropdownToggle.length; i++ ) { + dropdownToggle[i].addEventListener( 'click', toggleSubNav, false ); + dropdownToggle[i].addEventListener( 'keypress', function( e ) { + var key = e.which || e.keyCode; + if (key === 13) { // 13 is enter + toggleSubNav( e, this ); + } + }, false ); + } + + /** + * Disable the mobile menu if our toggle isn't visible. + * Makes it possible to style mobile item with .toggled class. + */ + var checkMobile = function() { + var openedMobileMenus = document.querySelectorAll( '.toggled, .has-active-search' ); + + for ( var i = 0; i < openedMobileMenus.length; i++ ) { + var menuToggle = openedMobileMenus[i].querySelector( '.menu-toggle' ); + + if ( mobileMenuControls && ! menuToggle.closest( 'nav' ).classList.contains( 'mobile-menu-control-wrapper' ) ) { + menuToggle = mobileMenuControls.querySelector( '.menu-toggle' ); + } + + if ( menuToggle && menuToggle.offsetParent === null ) { + if ( openedMobileMenus[i].classList.contains( 'toggled' ) ) { + var remoteNav = false; + + if ( openedMobileMenus[i].classList.contains( 'mobile-menu-control-wrapper' ) ) { + remoteNav = true; + } + + if ( ! remoteNav ) { + // Navigation is toggled, but .menu-toggle isn't visible on the page (display: none). + var closestNav = openedMobileMenus[i].getElementsByTagName( 'ul' )[ 0 ], + closestNavItems = closestNav.getElementsByTagName( 'li' ), + closestSubMenus = closestNav.getElementsByTagName( 'ul' ); + } + + document.activeElement.blur(); + openedMobileMenus[i].classList.remove( 'toggled' ); + + htmlEl.classList.remove( 'mobile-menu-open' ); + menuToggle.setAttribute( 'aria-expanded', 'false' ); + + if ( ! remoteNav ) { + for ( var li = 0; li < closestNavItems.length; li++ ) { + closestNavItems[li].classList.remove( 'sfHover' ); + } + + for ( var sm = 0; sm < closestSubMenus.length; sm++ ) { + closestSubMenus[sm].classList.remove( 'toggled-on' ); + } + + if ( closestNav ) { + closestNav.removeAttribute( 'aria-hidden' ); + } + } + + disableDropdownArrows( openedMobileMenus[i] ); + } + + if ( mobileMenuControls.querySelector( '.search-item' ) ) { + if ( mobileMenuControls.querySelector( '.search-item' ).classList.contains( 'active' ) ) { + mobileMenuControls.querySelector( '.search-item' ).click(); + } + } + } + } + } + window.addEventListener( 'resize', checkMobile, false ); + window.addEventListener( 'orientationchange', checkMobile, false ); + + if ( body.classList.contains( 'dropdown-hover' ) ) { + /** + * Do some essential things when menu items are clicked. + */ + for ( var i = 0; i < navLinks.length; i++ ) { + navLinks[i].addEventListener( 'click', function( e ) { + // Remove sfHover class if we're going to another site. + if ( this.hostname !== window.location.hostname ) { + document.activeElement.blur(); + } + + var closest_nav = this.closest( 'nav' ); + if ( closest_nav.classList.contains( 'toggled' ) || htmlEl.classList.contains( 'slide-opened' ) ) { + var url = this.getAttribute( 'href' ); + + // Open the sub-menu if the link has no destination + if ( '#' == url || '' == url ) { + e.preventDefault(); + var closestLi = this.closest( 'li' ); + closestLi.classList.toggle( 'sfHover' ); + var subMenu = closestLi.querySelector( '.sub-menu' ); + + if ( subMenu ) { + subMenu.classList.toggle( 'toggled-on' ); + } + } + } + }, false ); + } + } + + } + +})(); + +( function() { + 'use strict'; + + if ( 'querySelector' in document && 'addEventListener' in window ) { + var body = document.body; + + body.addEventListener( 'mousedown', function() { + body.classList.add( 'using-mouse' ); + } ); + + body.addEventListener( 'keydown', function() { + body.classList.remove( 'using-mouse' ); + } ); + + if ( body.classList.contains( 'dropdown-hover' ) ) { + var navLinks = document.querySelectorAll( 'nav .main-nav ul a' ), + menuBarItems = document.querySelectorAll( '.menu-bar-items .menu-bar-item > a' ); + + /** + * Make menu items tab accessible when using the hover dropdown type + */ + var toggleFocus = function() { + if ( this.closest( 'nav' ).classList.contains( 'toggled' ) || this.closest( 'nav' ).classList.contains( 'slideout-navigation' ) ) { + return; + } + + var self = this; + + while ( -1 === self.className.indexOf( 'main-nav' ) ) { + if ( 'li' === self.tagName.toLowerCase() ) { + self.classList.toggle( 'sfHover' ); + } + + self = self.parentElement; + } + } + + /** + * Make our menu bar items tab accessible. + */ + var toggleMenuBarItemFocus = function() { + if ( this.closest( 'nav' ).classList.contains( 'toggled' ) || this.closest( 'nav' ).classList.contains( 'slideout-navigation' ) ) { + return; + } + + var self = this; + + while ( -1 === self.className.indexOf( 'menu-bar-items' ) ) { + if ( self.classList.contains( 'menu-bar-item' ) ) { + self.classList.toggle( 'sfHover' ); + } + + self = self.parentElement; + } + } + + for ( var i = 0; i < navLinks.length; i++ ) { + navLinks[i].addEventListener( 'focus', toggleFocus ); + navLinks[i].addEventListener( 'blur', toggleFocus ); + } + + for ( var i = 0; i < menuBarItems.length; i++ ) { + menuBarItems[i].addEventListener( 'focus', toggleMenuBarItemFocus ); + menuBarItems[i].addEventListener( 'blur', toggleMenuBarItemFocus ); + } + } + } + + /** + * Make hover dropdown touch-friendly. + */ + if ( 'ontouchend' in document.documentElement && document.body.classList.contains( 'dropdown-hover' ) ) { + var parentElements = document.querySelectorAll( '.sf-menu .menu-item-has-children' ); + + for ( var i = 0; i < parentElements.length; i++ ) { + parentElements[i].addEventListener( 'touchend', function( e ) { + + // Bail on mobile + if ( this.closest( 'nav' ).classList.contains( 'toggled' ) ) { + return; + } + + if ( e.touches.length === 1 || e.touches.length === 0 ) { + // Prevent touch events within dropdown bubbling down to document + e.stopPropagation(); + + // Toggle hover + if ( ! this.classList.contains( 'sfHover' ) ) { + // Prevent link on first touch + if ( e.target === this || e.target.parentNode === this || e.target.parentNode.parentNode ) { + e.preventDefault(); + } + + var getSiblings = function( elem ) { + return Array.prototype.filter.call( elem.parentNode.children, function( sibling ) { + return sibling !== elem; + } ); + }; + + // Close other sub-menus. + var closestLi = this.closest( 'li' ), + siblings = getSiblings( closestLi ); + + for ( var i = 0; i < siblings.length; i++ ) { + if ( siblings[i].classList.contains( 'sfHover' ) ) { + siblings[i].classList.remove( 'sfHover' ); + } + } + + this.classList.add( 'sfHover' ); + + // Hide dropdown on touch outside + var closeDropdown, + thisItem = this; + + document.addEventListener( 'touchend', closeDropdown = function(e) { + e.stopPropagation(); + + thisItem.classList.remove( 'sfHover' ); + document.removeEventListener( 'touchend', closeDropdown ); + } ); + } + } + } ); + } + } +} )(); diff --git a/wp-content/themes/generatepress/assets/js/menu.js b/wp-content/themes/generatepress/assets/js/menu.js index dcd8a409..6902cdda 100644 --- a/wp-content/themes/generatepress/assets/js/menu.js +++ b/wp-content/themes/generatepress/assets/js/menu.js @@ -1,302 +1,302 @@ -( function() { - 'use strict'; - - if ( 'querySelector' in document && 'addEventListener' in window ) { - /** - * matches() pollyfil - * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/closest#Browser_compatibility - */ - if ( ! Element.prototype.matches ) { - Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector; - } - - /** - * closest() pollyfil - * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/closest#Browser_compatibility - */ - if ( ! Element.prototype.closest ) { - Element.prototype.closest = function( s ) { - var el = this; - var ancestor = this; - if ( ! document.documentElement.contains( el ) ) { - return null; - } - do { - if ( ancestor.matches( s ) ) { - return ancestor; - } - ancestor = ancestor.parentElement; - } while ( ancestor !== null ); - return null; - }; - } - - var getSiblings = function( elem ) { - return Array.prototype.filter.call( elem.parentNode.children, function( sibling ) { - return sibling !== elem; - } ); - }; - - var allNavToggles = document.querySelectorAll( '.menu-toggle' ), - dropdownToggle = document.querySelectorAll( 'nav .dropdown-menu-toggle' ), - navLinks = document.querySelectorAll( 'nav ul a' ), - mobileMenuControls = document.querySelector( '.mobile-menu-control-wrapper' ), - body = document.body, - htmlEl = document.documentElement; - - var enableDropdownArrows = function( nav ) { - if ( body.classList.contains( 'dropdown-hover' ) ) { - var dropdownItems = nav.querySelectorAll( 'li.menu-item-has-children' ); - - for ( var i = 0; i < dropdownItems.length; i++ ) { - dropdownItems[i].querySelector( '.dropdown-menu-toggle' ).setAttribute( 'tabindex', '0' ); - dropdownItems[i].querySelector( '.dropdown-menu-toggle' ).setAttribute( 'role', 'button' ); - dropdownItems[i].querySelector( '.dropdown-menu-toggle' ).setAttribute( 'aria-expanded', 'false' ); - dropdownItems[i].querySelector( '.dropdown-menu-toggle' ).setAttribute( 'aria-label', generatepressMenu.openSubMenuLabel ); - } - } - }; - - var disableDropdownArrows = function( nav ) { - if ( body.classList.contains( 'dropdown-hover' ) ) { - var dropdownItems = nav.querySelectorAll( 'li.menu-item-has-children' ); - - for ( var i = 0; i < dropdownItems.length; i++ ) { - dropdownItems[i].querySelector( '.dropdown-menu-toggle' ).removeAttribute( 'tabindex' ); - dropdownItems[i].querySelector( '.dropdown-menu-toggle' ).setAttribute( 'role', 'presentation' ); - dropdownItems[i].querySelector( '.dropdown-menu-toggle' ).removeAttribute( 'aria-expanded' ); - dropdownItems[i].querySelector( '.dropdown-menu-toggle' ).removeAttribute( 'aria-label' ); - } - } - }; - - var setDropdownArrowAttributes = function( arrow ) { - if ( 'false' === arrow.getAttribute( 'aria-expanded' ) || ! arrow.getAttribute( 'aria-expanded' ) ) { - arrow.setAttribute( 'aria-expanded', 'true' ); - arrow.setAttribute( 'aria-label', generatepressMenu.closeSubMenuLabel ); - } else { - arrow.setAttribute( 'aria-expanded', 'false' ); - arrow.setAttribute( 'aria-label', generatepressMenu.openSubMenuLabel ); - } - }; - - /** - * Start mobile menu toggle. - * - * @param e The event. - * @param _this The clicked item. - */ - var toggleNav = function( e, _this ) { - if ( ! _this ) { - var _this = this; - } - - var parentContainer = ''; - - if ( _this.getAttribute( 'data-nav' ) ) { - parentContainer = document.getElementById( _this.getAttribute( 'data-nav' ) ); - } else { - parentContainer = document.getElementById( _this.closest( 'nav' ).getAttribute( 'id' ) ); - } - - if ( ! parentContainer ) { - return; - } - - var isExternalToggle = false; - - if ( _this.closest( '.mobile-menu-control-wrapper' ) ) { - isExternalToggle = true; - } - - var nav = parentContainer.getElementsByTagName( 'ul' )[0]; - - if ( parentContainer.classList.contains( 'toggled' ) ) { - parentContainer.classList.remove( 'toggled' ); - htmlEl.classList.remove( 'mobile-menu-open' ); - nav.setAttribute( 'aria-hidden', 'true' ); - _this.setAttribute( 'aria-expanded', 'false' ); - - if ( isExternalToggle ) { - mobileMenuControls.classList.remove( 'toggled' ); - } else if ( mobileMenuControls && parentContainer.classList.contains( 'main-navigation' ) ) { - mobileMenuControls.classList.remove( 'toggled' ); - } - - disableDropdownArrows( nav ); - } else { - parentContainer.classList.add( 'toggled' ); - htmlEl.classList.add( 'mobile-menu-open' ); - nav.setAttribute( 'aria-hidden', 'false' ); - _this.setAttribute( 'aria-expanded', 'true' ); - - if ( isExternalToggle ) { - mobileMenuControls.classList.add( 'toggled' ); - - if ( mobileMenuControls.querySelector( '.search-item' ) ) { - if ( mobileMenuControls.querySelector( '.search-item' ).classList.contains( 'active' ) ) { - mobileMenuControls.querySelector( '.search-item' ).click(); - } - } - } else if ( mobileMenuControls && parentContainer.classList.contains( 'main-navigation' ) ) { - mobileMenuControls.classList.add( 'toggled' ); - } - - enableDropdownArrows( nav ); - } - } - - for ( var i = 0; i < allNavToggles.length; i++ ) { - allNavToggles[i].addEventListener( 'click', toggleNav, false ); - } - - /** - * Open sub-menus - * - * @param e The event. - * @param _this The clicked item. - */ - var toggleSubNav = function( e, _this ) { - - if ( ! _this ) { - var _this = this; - } - - if ( ( _this.closest( 'nav' ).classList.contains( 'toggled' ) || htmlEl.classList.contains( 'slide-opened' ) ) && ! body.classList.contains( 'dropdown-click' ) ) { - e.preventDefault(); - var closestLi = _this.closest( 'li' ); - - setDropdownArrowAttributes( closestLi.querySelector( '.dropdown-menu-toggle' ) ); - - if ( closestLi.querySelector( '.sub-menu' ) ) { - var subMenu = closestLi.querySelector( '.sub-menu' ); - } else { - var subMenu = closestLi.querySelector( '.children' ); - } - - if ( generatepressMenu.toggleOpenedSubMenus ) { - var siblings = getSiblings( closestLi ); - - for ( var i = 0; i < siblings.length; i++ ) { - if ( siblings[i].classList.contains( 'sfHover' ) ) { - siblings[i].classList.remove( 'sfHover' ); - siblings[i].querySelector( '.toggled-on' ).classList.remove( 'toggled-on' ); - setDropdownArrowAttributes( siblings[i].querySelector( '.dropdown-menu-toggle' ) ); - } - } - } - - closestLi.classList.toggle( 'sfHover' ); - subMenu.classList.toggle( 'toggled-on' ); - } - - e.stopPropagation(); - } - - for ( var i = 0; i < dropdownToggle.length; i++ ) { - dropdownToggle[i].addEventListener( 'click', toggleSubNav, false ); - dropdownToggle[i].addEventListener( 'keypress', function( e ) { - var key = e.which || e.keyCode; - if (key === 13) { // 13 is enter - toggleSubNav( e, this ); - } - }, false ); - } - - /** - * Disable the mobile menu if our toggle isn't visible. - * Makes it possible to style mobile item with .toggled class. - */ - var checkMobile = function() { - var openedMobileMenus = document.querySelectorAll( '.toggled, .has-active-search' ); - - for ( var i = 0; i < openedMobileMenus.length; i++ ) { - var menuToggle = openedMobileMenus[i].querySelector( '.menu-toggle' ); - - if ( mobileMenuControls && ! menuToggle.closest( 'nav' ).classList.contains( 'mobile-menu-control-wrapper' ) ) { - menuToggle = mobileMenuControls.querySelector( '.menu-toggle' ); - } - - if ( menuToggle && menuToggle.offsetParent === null ) { - if ( openedMobileMenus[i].classList.contains( 'toggled' ) ) { - var remoteNav = false; - - if ( openedMobileMenus[i].classList.contains( 'mobile-menu-control-wrapper' ) ) { - remoteNav = true; - } - - if ( ! remoteNav ) { - // Navigation is toggled, but .menu-toggle isn't visible on the page (display: none). - var closestNav = openedMobileMenus[i].getElementsByTagName( 'ul' )[ 0 ], - closestNavItems = closestNav.getElementsByTagName( 'li' ), - closestSubMenus = closestNav.getElementsByTagName( 'ul' ); - } - - document.activeElement.blur(); - openedMobileMenus[i].classList.remove( 'toggled' ); - - htmlEl.classList.remove( 'mobile-menu-open' ); - menuToggle.setAttribute( 'aria-expanded', 'false' ); - - if ( ! remoteNav ) { - for ( var li = 0; li < closestNavItems.length; li++ ) { - closestNavItems[li].classList.remove( 'sfHover' ); - } - - for ( var sm = 0; sm < closestSubMenus.length; sm++ ) { - closestSubMenus[sm].classList.remove( 'toggled-on' ); - } - - if ( closestNav ) { - closestNav.removeAttribute( 'aria-hidden' ); - } - } - - disableDropdownArrows( openedMobileMenus[i] ); - } - - if ( mobileMenuControls.querySelector( '.search-item' ) ) { - if ( mobileMenuControls.querySelector( '.search-item' ).classList.contains( 'active' ) ) { - mobileMenuControls.querySelector( '.search-item' ).click(); - } - } - } - } - } - window.addEventListener( 'resize', checkMobile, false ); - window.addEventListener( 'orientationchange', checkMobile, false ); - - if ( body.classList.contains( 'dropdown-hover' ) ) { - /** - * Do some essential things when menu items are clicked. - */ - for ( var i = 0; i < navLinks.length; i++ ) { - navLinks[i].addEventListener( 'click', function( e ) { - // Remove sfHover class if we're going to another site. - if ( this.hostname !== window.location.hostname ) { - document.activeElement.blur(); - } - - var closest_nav = this.closest( 'nav' ); - if ( closest_nav.classList.contains( 'toggled' ) || htmlEl.classList.contains( 'slide-opened' ) ) { - var url = this.getAttribute( 'href' ); - - // Open the sub-menu if the link has no destination - if ( '#' == url || '' == url ) { - e.preventDefault(); - var closestLi = this.closest( 'li' ); - closestLi.classList.toggle( 'sfHover' ); - var subMenu = closestLi.querySelector( '.sub-menu' ); - - if ( subMenu ) { - subMenu.classList.toggle( 'toggled-on' ); - } - } - } - }, false ); - } - } - - } - -})(); +( function() { + 'use strict'; + + if ( 'querySelector' in document && 'addEventListener' in window ) { + /** + * matches() pollyfil + * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/closest#Browser_compatibility + */ + if ( ! Element.prototype.matches ) { + Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector; + } + + /** + * closest() pollyfil + * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/closest#Browser_compatibility + */ + if ( ! Element.prototype.closest ) { + Element.prototype.closest = function( s ) { + var el = this; + var ancestor = this; + if ( ! document.documentElement.contains( el ) ) { + return null; + } + do { + if ( ancestor.matches( s ) ) { + return ancestor; + } + ancestor = ancestor.parentElement; + } while ( ancestor !== null ); + return null; + }; + } + + var getSiblings = function( elem ) { + return Array.prototype.filter.call( elem.parentNode.children, function( sibling ) { + return sibling !== elem; + } ); + }; + + var allNavToggles = document.querySelectorAll( '.menu-toggle' ), + dropdownToggle = document.querySelectorAll( 'nav .dropdown-menu-toggle' ), + navLinks = document.querySelectorAll( 'nav ul a' ), + mobileMenuControls = document.querySelector( '.mobile-menu-control-wrapper' ), + body = document.body, + htmlEl = document.documentElement; + + var enableDropdownArrows = function( nav ) { + if ( body.classList.contains( 'dropdown-hover' ) ) { + var dropdownItems = nav.querySelectorAll( 'li.menu-item-has-children' ); + + for ( var i = 0; i < dropdownItems.length; i++ ) { + dropdownItems[i].querySelector( '.dropdown-menu-toggle' ).setAttribute( 'tabindex', '0' ); + dropdownItems[i].querySelector( '.dropdown-menu-toggle' ).setAttribute( 'role', 'button' ); + dropdownItems[i].querySelector( '.dropdown-menu-toggle' ).setAttribute( 'aria-expanded', 'false' ); + dropdownItems[i].querySelector( '.dropdown-menu-toggle' ).setAttribute( 'aria-label', generatepressMenu.openSubMenuLabel ); + } + } + }; + + var disableDropdownArrows = function( nav ) { + if ( body.classList.contains( 'dropdown-hover' ) ) { + var dropdownItems = nav.querySelectorAll( 'li.menu-item-has-children' ); + + for ( var i = 0; i < dropdownItems.length; i++ ) { + dropdownItems[i].querySelector( '.dropdown-menu-toggle' ).removeAttribute( 'tabindex' ); + dropdownItems[i].querySelector( '.dropdown-menu-toggle' ).setAttribute( 'role', 'presentation' ); + dropdownItems[i].querySelector( '.dropdown-menu-toggle' ).removeAttribute( 'aria-expanded' ); + dropdownItems[i].querySelector( '.dropdown-menu-toggle' ).removeAttribute( 'aria-label' ); + } + } + }; + + var setDropdownArrowAttributes = function( arrow ) { + if ( 'false' === arrow.getAttribute( 'aria-expanded' ) || ! arrow.getAttribute( 'aria-expanded' ) ) { + arrow.setAttribute( 'aria-expanded', 'true' ); + arrow.setAttribute( 'aria-label', generatepressMenu.closeSubMenuLabel ); + } else { + arrow.setAttribute( 'aria-expanded', 'false' ); + arrow.setAttribute( 'aria-label', generatepressMenu.openSubMenuLabel ); + } + }; + + /** + * Start mobile menu toggle. + * + * @param e The event. + * @param _this The clicked item. + */ + var toggleNav = function( e, _this ) { + if ( ! _this ) { + var _this = this; + } + + var parentContainer = ''; + + if ( _this.getAttribute( 'data-nav' ) ) { + parentContainer = document.getElementById( _this.getAttribute( 'data-nav' ) ); + } else { + parentContainer = document.getElementById( _this.closest( 'nav' ).getAttribute( 'id' ) ); + } + + if ( ! parentContainer ) { + return; + } + + var isExternalToggle = false; + + if ( _this.closest( '.mobile-menu-control-wrapper' ) ) { + isExternalToggle = true; + } + + var nav = parentContainer.getElementsByTagName( 'ul' )[0]; + + if ( parentContainer.classList.contains( 'toggled' ) ) { + parentContainer.classList.remove( 'toggled' ); + htmlEl.classList.remove( 'mobile-menu-open' ); + nav.setAttribute( 'aria-hidden', 'true' ); + _this.setAttribute( 'aria-expanded', 'false' ); + + if ( isExternalToggle ) { + mobileMenuControls.classList.remove( 'toggled' ); + } else if ( mobileMenuControls && parentContainer.classList.contains( 'main-navigation' ) ) { + mobileMenuControls.classList.remove( 'toggled' ); + } + + disableDropdownArrows( nav ); + } else { + parentContainer.classList.add( 'toggled' ); + htmlEl.classList.add( 'mobile-menu-open' ); + nav.setAttribute( 'aria-hidden', 'false' ); + _this.setAttribute( 'aria-expanded', 'true' ); + + if ( isExternalToggle ) { + mobileMenuControls.classList.add( 'toggled' ); + + if ( mobileMenuControls.querySelector( '.search-item' ) ) { + if ( mobileMenuControls.querySelector( '.search-item' ).classList.contains( 'active' ) ) { + mobileMenuControls.querySelector( '.search-item' ).click(); + } + } + } else if ( mobileMenuControls && parentContainer.classList.contains( 'main-navigation' ) ) { + mobileMenuControls.classList.add( 'toggled' ); + } + + enableDropdownArrows( nav ); + } + } + + for ( var i = 0; i < allNavToggles.length; i++ ) { + allNavToggles[i].addEventListener( 'click', toggleNav, false ); + } + + /** + * Open sub-menus + * + * @param e The event. + * @param _this The clicked item. + */ + var toggleSubNav = function( e, _this ) { + + if ( ! _this ) { + var _this = this; + } + + if ( ( _this.closest( 'nav' ).classList.contains( 'toggled' ) || htmlEl.classList.contains( 'slide-opened' ) ) && ! body.classList.contains( 'dropdown-click' ) ) { + e.preventDefault(); + var closestLi = _this.closest( 'li' ); + + setDropdownArrowAttributes( closestLi.querySelector( '.dropdown-menu-toggle' ) ); + + if ( closestLi.querySelector( '.sub-menu' ) ) { + var subMenu = closestLi.querySelector( '.sub-menu' ); + } else { + var subMenu = closestLi.querySelector( '.children' ); + } + + if ( generatepressMenu.toggleOpenedSubMenus ) { + var siblings = getSiblings( closestLi ); + + for ( var i = 0; i < siblings.length; i++ ) { + if ( siblings[i].classList.contains( 'sfHover' ) ) { + siblings[i].classList.remove( 'sfHover' ); + siblings[i].querySelector( '.toggled-on' ).classList.remove( 'toggled-on' ); + setDropdownArrowAttributes( siblings[i].querySelector( '.dropdown-menu-toggle' ) ); + } + } + } + + closestLi.classList.toggle( 'sfHover' ); + subMenu.classList.toggle( 'toggled-on' ); + } + + e.stopPropagation(); + } + + for ( var i = 0; i < dropdownToggle.length; i++ ) { + dropdownToggle[i].addEventListener( 'click', toggleSubNav, false ); + dropdownToggle[i].addEventListener( 'keypress', function( e ) { + var key = e.which || e.keyCode; + if (key === 13) { // 13 is enter + toggleSubNav( e, this ); + } + }, false ); + } + + /** + * Disable the mobile menu if our toggle isn't visible. + * Makes it possible to style mobile item with .toggled class. + */ + var checkMobile = function() { + var openedMobileMenus = document.querySelectorAll( '.toggled, .has-active-search' ); + + for ( var i = 0; i < openedMobileMenus.length; i++ ) { + var menuToggle = openedMobileMenus[i].querySelector( '.menu-toggle' ); + + if ( mobileMenuControls && ! menuToggle.closest( 'nav' ).classList.contains( 'mobile-menu-control-wrapper' ) ) { + menuToggle = mobileMenuControls.querySelector( '.menu-toggle' ); + } + + if ( menuToggle && menuToggle.offsetParent === null ) { + if ( openedMobileMenus[i].classList.contains( 'toggled' ) ) { + var remoteNav = false; + + if ( openedMobileMenus[i].classList.contains( 'mobile-menu-control-wrapper' ) ) { + remoteNav = true; + } + + if ( ! remoteNav ) { + // Navigation is toggled, but .menu-toggle isn't visible on the page (display: none). + var closestNav = openedMobileMenus[i].getElementsByTagName( 'ul' )[ 0 ], + closestNavItems = closestNav.getElementsByTagName( 'li' ), + closestSubMenus = closestNav.getElementsByTagName( 'ul' ); + } + + document.activeElement.blur(); + openedMobileMenus[i].classList.remove( 'toggled' ); + + htmlEl.classList.remove( 'mobile-menu-open' ); + menuToggle.setAttribute( 'aria-expanded', 'false' ); + + if ( ! remoteNav ) { + for ( var li = 0; li < closestNavItems.length; li++ ) { + closestNavItems[li].classList.remove( 'sfHover' ); + } + + for ( var sm = 0; sm < closestSubMenus.length; sm++ ) { + closestSubMenus[sm].classList.remove( 'toggled-on' ); + } + + if ( closestNav ) { + closestNav.removeAttribute( 'aria-hidden' ); + } + } + + disableDropdownArrows( openedMobileMenus[i] ); + } + + if ( mobileMenuControls.querySelector( '.search-item' ) ) { + if ( mobileMenuControls.querySelector( '.search-item' ).classList.contains( 'active' ) ) { + mobileMenuControls.querySelector( '.search-item' ).click(); + } + } + } + } + } + window.addEventListener( 'resize', checkMobile, false ); + window.addEventListener( 'orientationchange', checkMobile, false ); + + if ( body.classList.contains( 'dropdown-hover' ) ) { + /** + * Do some essential things when menu items are clicked. + */ + for ( var i = 0; i < navLinks.length; i++ ) { + navLinks[i].addEventListener( 'click', function( e ) { + // Remove sfHover class if we're going to another site. + if ( this.hostname !== window.location.hostname ) { + document.activeElement.blur(); + } + + var closest_nav = this.closest( 'nav' ); + if ( closest_nav.classList.contains( 'toggled' ) || htmlEl.classList.contains( 'slide-opened' ) ) { + var url = this.getAttribute( 'href' ); + + // Open the sub-menu if the link has no destination + if ( '#' == url || '' == url ) { + e.preventDefault(); + var closestLi = this.closest( 'li' ); + closestLi.classList.toggle( 'sfHover' ); + var subMenu = closestLi.querySelector( '.sub-menu' ); + + if ( subMenu ) { + subMenu.classList.toggle( 'toggled-on' ); + } + } + } + }, false ); + } + } + + } + +})(); diff --git a/wp-content/themes/generatepress/assets/js/navigation-search.js b/wp-content/themes/generatepress/assets/js/navigation-search.js index 1babb267..3ce3bfa0 100644 --- a/wp-content/themes/generatepress/assets/js/navigation-search.js +++ b/wp-content/themes/generatepress/assets/js/navigation-search.js @@ -1,128 +1,128 @@ -( function() { - 'use strict'; - - if ( 'querySelector' in document && 'addEventListener' in window ) { - /** - * Navigation search. - * - * @param e The event. - * @param _this The clicked item. - */ - var toggleSearch = function( e, item ) { - e.preventDefault(); - - if ( ! item ) { - var item = this; - } - - var forms = document.querySelectorAll( '.navigation-search' ), - toggles = document.querySelectorAll( '.search-item' ), - focusableEls = document.querySelectorAll('a[href], area[href], input:not([disabled]):not(.navigation-search), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), [tabindex="0"]'), - nav = ''; - - if ( item.closest( '.mobile-menu-control-wrapper' ) ) { - nav = document.getElementById( 'site-navigation' ); - } - - for ( var i = 0; i < forms.length; i++ ) { - if ( forms[i].classList.contains( 'nav-search-active' ) ) { - if ( forms[i].closest( '#sticky-placeholder' ) ) { - continue; - } - - forms[i].classList.remove( 'nav-search-active' ); - - var activeSearch = document.querySelector( '.has-active-search' );; - - if ( activeSearch ) { - activeSearch.classList.remove( 'has-active-search' ); - } - - for ( var t = 0; t < toggles.length; t++ ) { - toggles[t].classList.remove( 'close-search' ); - toggles[t].classList.remove( 'active' ); - toggles[t].querySelector( 'a' ).setAttribute( 'aria-label', generatepressNavSearch.open ); - - // Allow tabindex on items again. - for ( var f = 0; f < focusableEls.length; f++ ) { - if ( ! focusableEls[f].closest( '.navigation-search' ) && ! focusableEls[f].closest( '.search-item' ) ) { - focusableEls[f].removeAttribute( 'tabindex' ); - } - }; - } - - document.activeElement.blur(); - } else { - if ( forms[i].closest( '#sticky-placeholder' ) ) { - continue; - } - - var openedMobileMenu = forms[i].closest( '.toggled' ); - - if ( openedMobileMenu ) { - // Close the mobile menu. - openedMobileMenu.querySelector( 'button.menu-toggle' ).click(); - } - - if ( nav ) { - nav.classList.add( 'has-active-search' ); - } - - forms[i].classList.add( 'nav-search-active' ); - - var container = this.closest( 'nav' ); - - if ( container ) { - if ( container.classList.contains( 'mobile-menu-control-wrapper' ) ) { - container = nav; - } - - var searchField = container.querySelector( '.search-field' ); - - if ( searchField ) { - searchField.focus(); - } - } - - for ( var t = 0; t < toggles.length; t++ ) { - toggles[t].classList.add( 'active' ); - toggles[t].querySelector( 'a' ).setAttribute( 'aria-label', generatepressNavSearch.close ); - - // Trap tabindex within the search element - for ( var f = 0; f < focusableEls.length; f++ ) { - if ( ! focusableEls[f].closest( '.navigation-search' ) && ! focusableEls[f].closest( '.search-item' ) ) { - focusableEls[f].setAttribute( 'tabindex', '-1' ); - } - }; - - toggles[t].classList.add( 'close-search' ); - } - } - } - } - - if ( document.body.classList.contains( 'nav-search-enabled' ) ) { - var searchItems = document.querySelectorAll( '.search-item' ); - - for ( var i = 0; i < searchItems.length; i++ ) { - searchItems[i].addEventListener( 'click', toggleSearch, false ); - } - - // Close navigation search on escape key - document.addEventListener( 'keydown', function( e ) { - if ( document.querySelector( '.navigation-search.nav-search-active' ) ) { - var key = e.which || e.keyCode; - - if ( key === 27 ) { // 27 is esc - var activeSearchItems = document.querySelectorAll( '.search-item.active' ); - - for ( var i = 0; i < activeSearchItems.length; i++ ) { - toggleSearch( e, activeSearchItems[i] ); - break; - } - } - } - }, false ); - } - } -})(); +( function() { + 'use strict'; + + if ( 'querySelector' in document && 'addEventListener' in window ) { + /** + * Navigation search. + * + * @param e The event. + * @param _this The clicked item. + */ + var toggleSearch = function( e, item ) { + e.preventDefault(); + + if ( ! item ) { + var item = this; + } + + var forms = document.querySelectorAll( '.navigation-search' ), + toggles = document.querySelectorAll( '.search-item' ), + focusableEls = document.querySelectorAll('a[href], area[href], input:not([disabled]):not(.navigation-search), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), [tabindex="0"]'), + nav = ''; + + if ( item.closest( '.mobile-menu-control-wrapper' ) ) { + nav = document.getElementById( 'site-navigation' ); + } + + for ( var i = 0; i < forms.length; i++ ) { + if ( forms[i].classList.contains( 'nav-search-active' ) ) { + if ( forms[i].closest( '#sticky-placeholder' ) ) { + continue; + } + + forms[i].classList.remove( 'nav-search-active' ); + + var activeSearch = document.querySelector( '.has-active-search' );; + + if ( activeSearch ) { + activeSearch.classList.remove( 'has-active-search' ); + } + + for ( var t = 0; t < toggles.length; t++ ) { + toggles[t].classList.remove( 'close-search' ); + toggles[t].classList.remove( 'active' ); + toggles[t].querySelector( 'a' ).setAttribute( 'aria-label', generatepressNavSearch.open ); + + // Allow tabindex on items again. + for ( var f = 0; f < focusableEls.length; f++ ) { + if ( ! focusableEls[f].closest( '.navigation-search' ) && ! focusableEls[f].closest( '.search-item' ) ) { + focusableEls[f].removeAttribute( 'tabindex' ); + } + }; + } + + document.activeElement.blur(); + } else { + if ( forms[i].closest( '#sticky-placeholder' ) ) { + continue; + } + + var openedMobileMenu = forms[i].closest( '.toggled' ); + + if ( openedMobileMenu ) { + // Close the mobile menu. + openedMobileMenu.querySelector( 'button.menu-toggle' ).click(); + } + + if ( nav ) { + nav.classList.add( 'has-active-search' ); + } + + forms[i].classList.add( 'nav-search-active' ); + + var container = this.closest( 'nav' ); + + if ( container ) { + if ( container.classList.contains( 'mobile-menu-control-wrapper' ) ) { + container = nav; + } + + var searchField = container.querySelector( '.search-field' ); + + if ( searchField ) { + searchField.focus(); + } + } + + for ( var t = 0; t < toggles.length; t++ ) { + toggles[t].classList.add( 'active' ); + toggles[t].querySelector( 'a' ).setAttribute( 'aria-label', generatepressNavSearch.close ); + + // Trap tabindex within the search element + for ( var f = 0; f < focusableEls.length; f++ ) { + if ( ! focusableEls[f].closest( '.navigation-search' ) && ! focusableEls[f].closest( '.search-item' ) ) { + focusableEls[f].setAttribute( 'tabindex', '-1' ); + } + }; + + toggles[t].classList.add( 'close-search' ); + } + } + } + } + + if ( document.body.classList.contains( 'nav-search-enabled' ) ) { + var searchItems = document.querySelectorAll( '.search-item' ); + + for ( var i = 0; i < searchItems.length; i++ ) { + searchItems[i].addEventListener( 'click', toggleSearch, false ); + } + + // Close navigation search on escape key + document.addEventListener( 'keydown', function( e ) { + if ( document.querySelector( '.navigation-search.nav-search-active' ) ) { + var key = e.which || e.keyCode; + + if ( key === 27 ) { // 27 is esc + var activeSearchItems = document.querySelectorAll( '.search-item.active' ); + + for ( var i = 0; i < activeSearchItems.length; i++ ) { + toggleSearch( e, activeSearchItems[i] ); + break; + } + } + } + }, false ); + } + } +})(); diff --git a/wp-content/themes/generatepress/content-404.php b/wp-content/themes/generatepress/content-404.php index 60d46b21..28b6b7c3 100644 --- a/wp-content/themes/generatepress/content-404.php +++ b/wp-content/themes/generatepress/content-404.php @@ -1,67 +1,67 @@ - -
- - - -
- -

-
- - - -
> - %s

', - apply_filters( 'generate_404_text', __( 'It looks like nothing was found at this location. Maybe try searching?', 'generatepress' ) ) // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- HTML is allowed in filter here. - ); - - get_search_form(); - ?> -
- - - -
+ +
+ + + +
+ +

+
+ + + +
> + %s

', + apply_filters( 'generate_404_text', __( 'It looks like nothing was found at this location. Maybe try searching?', 'generatepress' ) ) // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- HTML is allowed in filter here. + ); + + get_search_form(); + ?> +
+ + + +
diff --git a/wp-content/themes/generatepress/content-link.php b/wp-content/themes/generatepress/content-link.php index 794d532d..9d71f71d 100644 --- a/wp-content/themes/generatepress/content-link.php +++ b/wp-content/themes/generatepress/content-link.php @@ -1,111 +1,111 @@ - -
> -
- -
- -
- - -
> - -
- - - -
> - '', - ) - ); - ?> -
- - -
-
+ +
> +
+ +
+ +
+ + +
> + +
+ + + +
> + '', + ) + ); + ?> +
+ + +
+
diff --git a/wp-content/themes/generatepress/content-page.php b/wp-content/themes/generatepress/content-page.php index f0242c19..bb69d313 100644 --- a/wp-content/themes/generatepress/content-page.php +++ b/wp-content/themes/generatepress/content-page.php @@ -1,93 +1,93 @@ - - -
> -
- - -
- -
- - - -
> - '', - ) - ); - ?> -
- - -
-
+ + +
> +
+ + +
+ +
+ + + +
> + '', + ) + ); + ?> +
+ + +
+
diff --git a/wp-content/themes/generatepress/content-single.php b/wp-content/themes/generatepress/content-single.php index b6e13b58..4999367a 100644 --- a/wp-content/themes/generatepress/content-single.php +++ b/wp-content/themes/generatepress/content-single.php @@ -1,102 +1,102 @@ - - -
> -
- -
- -
- - -
> - '', - ) - ); - ?> -
- - -
-
+ + +
> +
+ +
+ +
+ + +
> + '', + ) + ); + ?> +
+ + +
+
diff --git a/wp-content/themes/generatepress/content.php b/wp-content/themes/generatepress/content.php index 1ef2f60c..d73d3976 100644 --- a/wp-content/themes/generatepress/content.php +++ b/wp-content/themes/generatepress/content.php @@ -1,111 +1,111 @@ - -
> -
- -
- -
- - -
> - -
- - - -
> - '', - ) - ); - ?> -
- - -
-
+ +
> +
+ +
+ +
+ + +
> + +
+ + + +
> + '', + ) + ); + ?> +
+ + +
+
diff --git a/wp-content/themes/generatepress/footer.php b/wp-content/themes/generatepress/footer.php index 0ac9515a..da876004 100644 --- a/wp-content/themes/generatepress/footer.php +++ b/wp-content/themes/generatepress/footer.php @@ -1,65 +1,65 @@ - - - - - - - -
> - -
- - - - - + + + + + + + +
> + +
+ + + + + diff --git a/wp-content/themes/generatepress/functions.php b/wp-content/themes/generatepress/functions.php index fb97d97e..3f05e70c 100644 --- a/wp-content/themes/generatepress/functions.php +++ b/wp-content/themes/generatepress/functions.php @@ -1,103 +1,103 @@ - 70, - 'width' => 350, - 'flex-height' => true, - 'flex-width' => true, - ) - ); - - // Register primary menu. - register_nav_menus( - array( - 'primary' => __( 'Primary Menu', 'generatepress' ), - ) - ); - - /** - * Set the content width to something large - * We set a more accurate width in generate_smart_content_width() - */ - global $content_width; - if ( ! isset( $content_width ) ) { - $content_width = 1200; /* pixels */ - } - - // This theme styles the visual editor to resemble the theme style. - add_editor_style( 'assets/css/admin/editor-style.css' ); - } -} - -/** - * Get all necessary theme files - */ -$theme_dir = get_template_directory(); - -require $theme_dir . '/inc/theme-functions.php'; -require $theme_dir . '/inc/defaults.php'; -require $theme_dir . '/inc/class-css.php'; -require $theme_dir . '/inc/css-output.php'; -require $theme_dir . '/inc/general.php'; -require $theme_dir . '/inc/customizer.php'; -require $theme_dir . '/inc/markup.php'; -require $theme_dir . '/inc/typography.php'; -require $theme_dir . '/inc/plugin-compat.php'; -require $theme_dir . '/inc/block-editor.php'; -require $theme_dir . '/inc/class-theme-update.php'; -require $theme_dir . '/inc/deprecated.php'; - -if ( is_admin() ) { - require $theme_dir . '/inc/meta-box.php'; - require $theme_dir . '/inc/dashboard.php'; -} - -/** - * Load our theme structure - */ -require $theme_dir . '/inc/structure/archives.php'; -require $theme_dir . '/inc/structure/comments.php'; -require $theme_dir . '/inc/structure/featured-images.php'; -require $theme_dir . '/inc/structure/footer.php'; -require $theme_dir . '/inc/structure/header.php'; -require $theme_dir . '/inc/structure/navigation.php'; -require $theme_dir . '/inc/structure/post-meta.php'; -require $theme_dir . '/inc/structure/sidebars.php'; + 70, + 'width' => 350, + 'flex-height' => true, + 'flex-width' => true, + ) + ); + + // Register primary menu. + register_nav_menus( + array( + 'primary' => __( 'Primary Menu', 'generatepress' ), + ) + ); + + /** + * Set the content width to something large + * We set a more accurate width in generate_smart_content_width() + */ + global $content_width; + if ( ! isset( $content_width ) ) { + $content_width = 1200; /* pixels */ + } + + // This theme styles the visual editor to resemble the theme style. + add_editor_style( 'assets/css/admin/editor-style.css' ); + } +} + +/** + * Get all necessary theme files + */ +$theme_dir = get_template_directory(); + +require $theme_dir . '/inc/theme-functions.php'; +require $theme_dir . '/inc/defaults.php'; +require $theme_dir . '/inc/class-css.php'; +require $theme_dir . '/inc/css-output.php'; +require $theme_dir . '/inc/general.php'; +require $theme_dir . '/inc/customizer.php'; +require $theme_dir . '/inc/markup.php'; +require $theme_dir . '/inc/typography.php'; +require $theme_dir . '/inc/plugin-compat.php'; +require $theme_dir . '/inc/block-editor.php'; +require $theme_dir . '/inc/class-theme-update.php'; +require $theme_dir . '/inc/deprecated.php'; + +if ( is_admin() ) { + require $theme_dir . '/inc/meta-box.php'; + require $theme_dir . '/inc/dashboard.php'; +} + +/** + * Load our theme structure + */ +require $theme_dir . '/inc/structure/archives.php'; +require $theme_dir . '/inc/structure/comments.php'; +require $theme_dir . '/inc/structure/featured-images.php'; +require $theme_dir . '/inc/structure/footer.php'; +require $theme_dir . '/inc/structure/header.php'; +require $theme_dir . '/inc/structure/navigation.php'; +require $theme_dir . '/inc/structure/post-meta.php'; +require $theme_dir . '/inc/structure/sidebars.php'; diff --git a/wp-content/themes/generatepress/header.php b/wp-content/themes/generatepress/header.php index 1b1de782..ec3fe70b 100644 --- a/wp-content/themes/generatepress/header.php +++ b/wp-content/themes/generatepress/header.php @@ -1,75 +1,75 @@ - -> - - - - - - - > - - -
> - -
- +> + + + + + + + > + + +
> + +
+ post_type ) { - $layout = generate_get_option( 'single_layout_setting' ); - } - } - - // Add in our default filter in case people have adjusted it. - $layout = apply_filters( 'generate_sidebar_layout', $layout ); - - if ( $meta ) { - $layout_meta = get_post_meta( get_the_ID(), '_generate-sidebar-layout-meta', true ); - - if ( $layout_meta ) { - $layout = $layout_meta; - } - } - - return apply_filters( 'generate_block_editor_sidebar_layout', $layout ); -} - -/** - * Check whether we're disabling the content title or not. - * We need this function as the post meta in generate_show_title() only runs - * on is_singular() - * - * @since 2.2 - */ -function generate_get_block_editor_show_content_title() { - $title = generate_show_title(); - - $disable_title = get_post_meta( get_the_ID(), '_generate-disable-headline', true ); - - if ( $disable_title ) { - $title = false; - } - - return apply_filters( 'generate_block_editor_show_content_title', $title ); -} - -/** - * Get the content width for this post. - * - * @since 2.2 - */ -function generate_get_block_editor_content_width() { - $container_width = generate_get_option( 'container_width' ); - - $content_width = $container_width; - - $right_sidebar_width = apply_filters( 'generate_right_sidebar_width', '25' ); - - $left_sidebar_width = apply_filters( 'generate_left_sidebar_width', '25' ); - - $layout = generate_get_block_editor_sidebar_layout(); - - if ( 'left-sidebar' === $layout ) { - $content_width = $container_width * ( ( 100 - $left_sidebar_width ) / 100 ); - } elseif ( 'right-sidebar' === $layout ) { - $content_width = $container_width * ( ( 100 - $right_sidebar_width ) / 100 ); - } elseif ( 'no-sidebar' === $layout ) { - $content_width = $container_width; - } else { - $content_width = $container_width * ( ( 100 - ( $left_sidebar_width + $right_sidebar_width ) ) / 100 ); - } - - return apply_filters( 'generate_block_editor_content_width', $content_width ); -} - -add_action( 'enqueue_block_editor_assets', 'generate_enqueue_google_fonts' ); -add_action( 'enqueue_block_editor_assets', 'generate_enqueue_backend_block_editor_assets' ); -/** - * Add CSS to the admin side of the block editor. - * - * @since 2.2 - */ -function generate_enqueue_backend_block_editor_assets() { - wp_enqueue_style( 'generate-block-editor-styles', get_template_directory_uri() . '/assets/css/admin/block-editor.css', false, GENERATE_VERSION, 'all' ); - wp_enqueue_script( 'generate-block-editor-tinycolor', get_template_directory_uri() . '/assets/js/admin/tinycolor.js', false, GENERATE_VERSION, true ); - wp_enqueue_script( 'generate-block-editor-scripts', get_template_directory_uri() . '/assets/js/admin/block-editor.js', array( 'jquery', 'generate-block-editor-tinycolor' ), GENERATE_VERSION, true ); - - $show_editor_styles = apply_filters( 'generate_show_block_editor_styles', true ); - - if ( $show_editor_styles ) { - wp_add_inline_style( 'generate-block-editor-styles', wp_strip_all_tags( generate_do_inline_block_editor_css() ) ); - } - - $color_settings = wp_parse_args( - get_option( 'generate_settings', array() ), - generate_get_color_defaults() - ); - - $spacing_settings = wp_parse_args( - get_option( 'generate_spacing_settings', array() ), - generate_spacing_get_defaults() - ); - - $text_color = generate_get_option( 'text_color' ); - - if ( $color_settings['content_text_color'] ) { - $text_color = $color_settings['content_text_color']; - } - - wp_localize_script( - 'generate-block-editor-scripts', - 'generate_block_editor', - array( - 'global_sidebar_layout' => generate_get_block_editor_sidebar_layout( false ), - 'container_width' => generate_get_option( 'container_width' ), - 'right_sidebar_width' => apply_filters( 'generate_right_sidebar_width', '25' ), - 'left_sidebar_width' => apply_filters( 'generate_left_sidebar_width', '25' ), - 'content_padding_right' => absint( $spacing_settings['content_right'] ) . 'px', - 'content_padding_left' => absint( $spacing_settings['content_left'] ) . 'px', - 'content_title' => generate_get_block_editor_show_content_title() ? 'true' : 'false', - 'disable_content_title' => esc_html__( 'Disable Content Title', 'generatepress' ), - 'show_content_title' => esc_html__( 'Show Content Title', 'generatepress' ), - 'text_color' => $text_color, - 'show_editor_styles' => $show_editor_styles, - ) - ); -} - -/** - * Write our CSS for the block editor. - * - * @since 2.2 - */ -function generate_do_inline_block_editor_css() { - $color_settings = wp_parse_args( - get_option( 'generate_settings', array() ), - generate_get_color_defaults() - ); - - $font_settings = wp_parse_args( - get_option( 'generate_settings', array() ), - generate_get_default_fonts() - ); - - $css = new GeneratePress_CSS(); - - $content_width = generate_get_block_editor_content_width(); - - $spacing_settings = wp_parse_args( - get_option( 'generate_spacing_settings', array() ), - generate_spacing_get_defaults() - ); - - $content_width_calc = sprintf( - 'calc(%1$s - %2$s - %3$s)', - absint( $content_width ) . 'px', - absint( $spacing_settings['content_left'] ) . 'px', - absint( $spacing_settings['content_right'] ) . 'px' - ); - - $css->set_selector( 'body .wp-block, html body.gutenberg-editor-page .editor-post-title__block, html body.gutenberg-editor-page .editor-default-block-appender, html body.gutenberg-editor-page .editor-block-list__block' ); - - if ( 'true' === get_post_meta( get_the_ID(), '_generate-full-width-content', true ) ) { - $css->add_property( 'max-width', '100%' ); - } else { - $css->add_property( 'max-width', $content_width_calc ); - } - - $css->set_selector( 'html body.gutenberg-editor-page .block-editor-block-list__block[data-align="full"]' ); - $css->add_property( 'max-width', 'none' ); - - $css->set_selector( '.wp-block[data-align="wide"]' ); - $css->add_property( 'max-width', absint( $content_width ), false, 'px' ); - - if ( apply_filters( 'generate_do_group_inner_container_style', true ) ) { - $css->set_selector( '.wp-block-group__inner-container' ); - $css->add_property( 'max-width', absint( $content_width ), false, 'px' ); - $css->add_property( 'margin-left', 'auto' ); - $css->add_property( 'margin-right', 'auto' ); - $css->add_property( 'padding', generate_padding_css( $spacing_settings['content_top'], $spacing_settings['content_right'], $spacing_settings['content_bottom'], $spacing_settings['content_left'] ) ); - } - - $css->set_selector( '.editor-styles-wrapper a.button, .wp-block-button__link:not(.has-background)' ); - $css->add_property( 'color', $color_settings['form_button_text_color'] ); - $css->add_property( 'background-color', $color_settings['form_button_background_color'] ); - - $css->set_selector( '.editor-styles-wrapper a.button:hover, .editor-styles-wrapper a.button:focus, .wp-block-button__link:not(.has-background):active, .wp-block-button__link:not(.has-background):focus, .wp-block-button__link:not(.has-background):hover' ); - $css->add_property( 'color', $color_settings['form_button_text_color_hover'] ); - $css->add_property( 'background-color', $color_settings['form_button_background_color_hover'] ); - - $body_family = generate_get_font_family_css( 'font_body', 'generate_settings', generate_get_default_fonts() ); - $h1_family = generate_get_font_family_css( 'font_heading_1', 'generate_settings', generate_get_default_fonts() ); - $h2_family = generate_get_font_family_css( 'font_heading_2', 'generate_settings', generate_get_default_fonts() ); - $h3_family = generate_get_font_family_css( 'font_heading_3', 'generate_settings', generate_get_default_fonts() ); - $h4_family = generate_get_font_family_css( 'font_heading_4', 'generate_settings', generate_get_default_fonts() ); - $h5_family = generate_get_font_family_css( 'font_heading_5', 'generate_settings', generate_get_default_fonts() ); - $h6_family = generate_get_font_family_css( 'font_heading_6', 'generate_settings', generate_get_default_fonts() ); - $buttons_family = generate_get_font_family_css( 'font_buttons', 'generate_settings', generate_get_default_fonts() ); - - $css->set_selector( 'body.gutenberg-editor-page .block-editor-block-list__block, body .editor-styles-wrapper' ); - $css->add_property( 'font-family', $body_family ); - $css->add_property( 'font-size', absint( $font_settings['body_font_size'] ), false, 'px' ); - - if ( $color_settings['content_text_color'] ) { - $css->add_property( 'color', $color_settings['content_text_color'] ); - } else { - $css->add_property( 'color', generate_get_option( 'text_color' ) ); - } - - $css->set_selector( '.content-title-visibility' ); - - if ( $color_settings['content_text_color'] ) { - $css->add_property( 'color', $color_settings['content_text_color'] ); - } else { - $css->add_property( 'color', generate_get_option( 'text_color' ) ); - } - - $css->set_selector( 'body .editor-styles-wrapper, body .editor-styles-wrapper p, body .editor-styles-wrapper .mce-content-body' ); - $css->add_property( 'line-height', floatval( $font_settings['body_line_height'] ) ); - - $css->set_selector( 'body .editor-styles-wrapper p' ); - $css->add_property( 'margin-top', '0px' ); - $css->add_property( 'margin-bottom', $font_settings['paragraph_margin'], false, 'em' ); - - $css->set_selector( 'body .editor-styles-wrapper h1, .wp-block-heading h1.editor-rich-text__tinymce, .editor-post-title__block .editor-post-title__input' ); - $css->add_property( 'font-family', 'inherit' === $h1_family || '' === $h1_family ? $body_family : $h1_family ); - $css->add_property( 'font-weight', $font_settings['heading_1_weight'] ); - $css->add_property( 'text-transform', $font_settings['heading_1_transform'] ); - $css->add_property( 'font-size', absint( $font_settings['heading_1_font_size'] ), false, 'px' ); - $css->add_property( 'line-height', floatval( $font_settings['heading_1_line_height'] ), false, 'em' ); - $css->add_property( 'margin-bottom', floatval( $font_settings['heading_1_margin_bottom'] ), false, 'px' ); - $css->add_property( 'margin-top', '0' ); - - if ( $color_settings['h1_color'] ) { - $css->add_property( 'color', $color_settings['h1_color'] ); - } elseif ( $color_settings['content_text_color'] ) { - $css->add_property( 'color', $color_settings['content_text_color'] ); - } else { - $css->add_property( 'color', generate_get_option( 'text_color' ) ); - } - - if ( $color_settings['content_title_color'] ) { - $css->set_selector( '.editor-post-title__block .editor-post-title__input' ); - $css->add_property( 'color', $color_settings['content_title_color'] ); - } - - $css->set_selector( 'body .editor-styles-wrapper h2, .wp-block-heading h2.editor-rich-text__tinymce' ); - $css->add_property( 'font-family', $h2_family ); - $css->add_property( 'font-weight', $font_settings['heading_2_weight'] ); - $css->add_property( 'text-transform', $font_settings['heading_2_transform'] ); - $css->add_property( 'font-size', absint( $font_settings['heading_2_font_size'] ), false, 'px' ); - $css->add_property( 'line-height', floatval( $font_settings['heading_2_line_height'] ), false, 'em' ); - $css->add_property( 'margin-bottom', floatval( $font_settings['heading_2_margin_bottom'] ), false, 'px' ); - $css->add_property( 'margin-top', '0' ); - - if ( $color_settings['h2_color'] ) { - $css->add_property( 'color', $color_settings['h2_color'] ); - } elseif ( $color_settings['content_text_color'] ) { - $css->add_property( 'color', $color_settings['content_text_color'] ); - } else { - $css->add_property( 'color', generate_get_option( 'text_color' ) ); - } - - $css->set_selector( 'body .editor-styles-wrapper h3, .wp-block-heading h3.editor-rich-text__tinymce' ); - $css->add_property( 'font-family', $h3_family ); - $css->add_property( 'font-weight', $font_settings['heading_3_weight'] ); - $css->add_property( 'text-transform', $font_settings['heading_3_transform'] ); - $css->add_property( 'font-size', absint( $font_settings['heading_3_font_size'] ), false, 'px' ); - $css->add_property( 'line-height', floatval( $font_settings['heading_3_line_height'] ), false, 'em' ); - $css->add_property( 'margin-bottom', floatval( $font_settings['heading_3_margin_bottom'] ), false, 'px' ); - $css->add_property( 'margin-top', '0' ); - - if ( $color_settings['h3_color'] ) { - $css->add_property( 'color', $color_settings['h3_color'] ); - } elseif ( $color_settings['content_text_color'] ) { - $css->add_property( 'color', $color_settings['content_text_color'] ); - } else { - $css->add_property( 'color', generate_get_option( 'text_color' ) ); - } - - $css->set_selector( 'body .editor-styles-wrapper h4, .wp-block-heading h4.editor-rich-text__tinymce' ); - $css->add_property( 'font-family', $h4_family ); - $css->add_property( 'font-weight', $font_settings['heading_4_weight'] ); - $css->add_property( 'text-transform', $font_settings['heading_4_transform'] ); - $css->add_property( 'margin-bottom', '20px' ); - $css->add_property( 'margin-top', '0' ); - - if ( '' !== $font_settings['heading_4_font_size'] ) { - $css->add_property( 'font-size', absint( $font_settings['heading_4_font_size'] ), false, 'px' ); - } else { - $css->add_property( 'font-size', 'inherit' ); - } - - if ( '' !== $font_settings['heading_4_line_height'] ) { - $css->add_property( 'line-height', floatval( $font_settings['heading_4_line_height'] ), false, 'em' ); - } - - if ( $color_settings['h4_color'] ) { - $css->add_property( 'color', $color_settings['h4_color'] ); - } elseif ( $color_settings['content_text_color'] ) { - $css->add_property( 'color', $color_settings['content_text_color'] ); - } else { - $css->add_property( 'color', generate_get_option( 'text_color' ) ); - } - - $css->set_selector( 'body .editor-styles-wrapper h5, .wp-block-heading h5.editor-rich-text__tinymce' ); - $css->add_property( 'font-family', $h5_family ); - $css->add_property( 'font-weight', $font_settings['heading_5_weight'] ); - $css->add_property( 'text-transform', $font_settings['heading_5_transform'] ); - $css->add_property( 'margin-bottom', '20px' ); - $css->add_property( 'margin-top', '0' ); - - if ( '' !== $font_settings['heading_5_font_size'] ) { - $css->add_property( 'font-size', absint( $font_settings['heading_5_font_size'] ), false, 'px' ); - } else { - $css->add_property( 'font-size', 'inherit' ); - } - - if ( '' !== $font_settings['heading_5_line_height'] ) { - $css->add_property( 'line-height', floatval( $font_settings['heading_5_line_height'] ), false, 'em' ); - } - - if ( $color_settings['h5_color'] ) { - $css->add_property( 'color', $color_settings['h5_color'] ); - } elseif ( $color_settings['content_text_color'] ) { - $css->add_property( 'color', $color_settings['content_text_color'] ); - } else { - $css->add_property( 'color', generate_get_option( 'text_color' ) ); - } - - $css->set_selector( 'body .editor-styles-wrapper h6, .wp-block-heading h6.editor-rich-text__tinymce' ); - $css->add_property( 'font-family', $h6_family ); - $css->add_property( 'font-weight', $font_settings['heading_6_weight'] ); - $css->add_property( 'text-transform', $font_settings['heading_6_transform'] ); - $css->add_property( 'margin-bottom', '20px' ); - $css->add_property( 'margin-top', '0' ); - - if ( '' !== $font_settings['heading_6_font_size'] ) { - $css->add_property( 'font-size', absint( $font_settings['heading_6_font_size'] ), false, 'px' ); - } else { - $css->add_property( 'font-size', 'inherit' ); - } - - if ( '' !== $font_settings['heading_6_line_height'] ) { - $css->add_property( 'line-height', floatval( $font_settings['heading_6_line_height'] ), false, 'em' ); - } - - if ( $color_settings['h6_color'] ) { - $css->add_property( 'color', $color_settings['h6_color'] ); - } elseif ( $color_settings['content_text_color'] ) { - $css->add_property( 'color', $color_settings['content_text_color'] ); - } else { - $css->add_property( 'color', generate_get_option( 'text_color' ) ); - } - - $css->set_selector( '.editor-styles-wrapper a.button, .block-editor-block-list__layout .wp-block-button .wp-block-button__link' ); - $css->add_property( 'font-family', $buttons_family ); - $css->add_property( 'font-weight', $font_settings['buttons_font_weight'] ); - $css->add_property( 'text-transform', $font_settings['buttons_font_transform'] ); - - if ( '' !== $font_settings['buttons_font_size'] ) { - $css->add_property( 'font-size', absint( $font_settings['buttons_font_size'] ), false, 'px' ); - } - - if ( version_compare( $GLOBALS['wp_version'], '5.7-alpha.1', '>' ) ) { - $css->set_selector( '.block-editor__container .edit-post-visual-editor' ); - $css->add_property( 'background-color', generate_get_option( 'background_color' ) ); - - $css->set_selector( '.block-editor__container .editor-styles-wrapper' ); - - if ( $color_settings['content_background_color'] ) { - $css->add_property( 'background-color', $color_settings['content_background_color'] ); - } else { - $css->add_property( 'background-color', generate_get_option( 'background_color' ) ); - } - } else { - $css->set_selector( 'body .editor-styles-wrapper' ); - $css->add_property( 'background-color', generate_get_option( 'background_color' ) ); - - if ( $color_settings['content_background_color'] ) { - $body_background = generate_get_option( 'background_color' ); - $content_background = $color_settings['content_background_color']; - - $css->add_property( 'background', 'linear-gradient(' . $content_background . ',' . $content_background . '), linear-gradient(' . $body_background . ',' . $body_background . ')' ); - } - } - - $css->set_selector( '.block-editor-block-list__block a, .block-editor-block-list__block a:visited' ); - - if ( $color_settings['content_link_color'] ) { - $css->add_property( 'color', $color_settings['content_link_color'] ); - } else { - $css->add_property( 'color', generate_get_option( 'link_color' ) ); - } - - $css->set_selector( '.block-editor-block-list__block a:hover, .block-editor-block-list__block a:focus, .block-editor-block-list__block a:active' ); - - if ( $color_settings['content_link_hover_color'] ) { - $css->add_property( 'color', $color_settings['content_link_hover_color'] ); - } else { - $css->add_property( 'color', generate_get_option( 'link_color_hover' ) ); - } - - return $css->css_output(); -} +post_type ) { + $layout = generate_get_option( 'single_layout_setting' ); + } + } + + // Add in our default filter in case people have adjusted it. + $layout = apply_filters( 'generate_sidebar_layout', $layout ); + + if ( $meta ) { + $layout_meta = get_post_meta( get_the_ID(), '_generate-sidebar-layout-meta', true ); + + if ( $layout_meta ) { + $layout = $layout_meta; + } + } + + return apply_filters( 'generate_block_editor_sidebar_layout', $layout ); +} + +/** + * Check whether we're disabling the content title or not. + * We need this function as the post meta in generate_show_title() only runs + * on is_singular() + * + * @since 2.2 + */ +function generate_get_block_editor_show_content_title() { + $title = generate_show_title(); + + $disable_title = get_post_meta( get_the_ID(), '_generate-disable-headline', true ); + + if ( $disable_title ) { + $title = false; + } + + return apply_filters( 'generate_block_editor_show_content_title', $title ); +} + +/** + * Get the content width for this post. + * + * @since 2.2 + */ +function generate_get_block_editor_content_width() { + $container_width = generate_get_option( 'container_width' ); + + $content_width = $container_width; + + $right_sidebar_width = apply_filters( 'generate_right_sidebar_width', '25' ); + + $left_sidebar_width = apply_filters( 'generate_left_sidebar_width', '25' ); + + $layout = generate_get_block_editor_sidebar_layout(); + + if ( 'left-sidebar' === $layout ) { + $content_width = $container_width * ( ( 100 - $left_sidebar_width ) / 100 ); + } elseif ( 'right-sidebar' === $layout ) { + $content_width = $container_width * ( ( 100 - $right_sidebar_width ) / 100 ); + } elseif ( 'no-sidebar' === $layout ) { + $content_width = $container_width; + } else { + $content_width = $container_width * ( ( 100 - ( $left_sidebar_width + $right_sidebar_width ) ) / 100 ); + } + + return apply_filters( 'generate_block_editor_content_width', $content_width ); +} + +add_action( 'enqueue_block_editor_assets', 'generate_enqueue_google_fonts' ); +add_action( 'enqueue_block_editor_assets', 'generate_enqueue_backend_block_editor_assets' ); +/** + * Add CSS to the admin side of the block editor. + * + * @since 2.2 + */ +function generate_enqueue_backend_block_editor_assets() { + wp_enqueue_style( 'generate-block-editor-styles', get_template_directory_uri() . '/assets/css/admin/block-editor.css', false, GENERATE_VERSION, 'all' ); + wp_enqueue_script( 'generate-block-editor-tinycolor', get_template_directory_uri() . '/assets/js/admin/tinycolor.js', false, GENERATE_VERSION, true ); + wp_enqueue_script( 'generate-block-editor-scripts', get_template_directory_uri() . '/assets/js/admin/block-editor.js', array( 'jquery', 'generate-block-editor-tinycolor' ), GENERATE_VERSION, true ); + + $show_editor_styles = apply_filters( 'generate_show_block_editor_styles', true ); + + if ( $show_editor_styles ) { + wp_add_inline_style( 'generate-block-editor-styles', wp_strip_all_tags( generate_do_inline_block_editor_css() ) ); + } + + $color_settings = wp_parse_args( + get_option( 'generate_settings', array() ), + generate_get_color_defaults() + ); + + $spacing_settings = wp_parse_args( + get_option( 'generate_spacing_settings', array() ), + generate_spacing_get_defaults() + ); + + $text_color = generate_get_option( 'text_color' ); + + if ( $color_settings['content_text_color'] ) { + $text_color = $color_settings['content_text_color']; + } + + wp_localize_script( + 'generate-block-editor-scripts', + 'generate_block_editor', + array( + 'global_sidebar_layout' => generate_get_block_editor_sidebar_layout( false ), + 'container_width' => generate_get_option( 'container_width' ), + 'right_sidebar_width' => apply_filters( 'generate_right_sidebar_width', '25' ), + 'left_sidebar_width' => apply_filters( 'generate_left_sidebar_width', '25' ), + 'content_padding_right' => absint( $spacing_settings['content_right'] ) . 'px', + 'content_padding_left' => absint( $spacing_settings['content_left'] ) . 'px', + 'content_title' => generate_get_block_editor_show_content_title() ? 'true' : 'false', + 'disable_content_title' => esc_html__( 'Disable Content Title', 'generatepress' ), + 'show_content_title' => esc_html__( 'Show Content Title', 'generatepress' ), + 'text_color' => $text_color, + 'show_editor_styles' => $show_editor_styles, + ) + ); +} + +/** + * Write our CSS for the block editor. + * + * @since 2.2 + */ +function generate_do_inline_block_editor_css() { + $color_settings = wp_parse_args( + get_option( 'generate_settings', array() ), + generate_get_color_defaults() + ); + + $font_settings = wp_parse_args( + get_option( 'generate_settings', array() ), + generate_get_default_fonts() + ); + + $css = new GeneratePress_CSS(); + + $content_width = generate_get_block_editor_content_width(); + + $spacing_settings = wp_parse_args( + get_option( 'generate_spacing_settings', array() ), + generate_spacing_get_defaults() + ); + + $content_width_calc = sprintf( + 'calc(%1$s - %2$s - %3$s)', + absint( $content_width ) . 'px', + absint( $spacing_settings['content_left'] ) . 'px', + absint( $spacing_settings['content_right'] ) . 'px' + ); + + $css->set_selector( 'body .wp-block, html body.gutenberg-editor-page .editor-post-title__block, html body.gutenberg-editor-page .editor-default-block-appender, html body.gutenberg-editor-page .editor-block-list__block' ); + + if ( 'true' === get_post_meta( get_the_ID(), '_generate-full-width-content', true ) ) { + $css->add_property( 'max-width', '100%' ); + } else { + $css->add_property( 'max-width', $content_width_calc ); + } + + $css->set_selector( 'html body.gutenberg-editor-page .block-editor-block-list__block[data-align="full"]' ); + $css->add_property( 'max-width', 'none' ); + + $css->set_selector( '.wp-block[data-align="wide"]' ); + $css->add_property( 'max-width', absint( $content_width ), false, 'px' ); + + if ( apply_filters( 'generate_do_group_inner_container_style', true ) ) { + $css->set_selector( '.wp-block-group__inner-container' ); + $css->add_property( 'max-width', absint( $content_width ), false, 'px' ); + $css->add_property( 'margin-left', 'auto' ); + $css->add_property( 'margin-right', 'auto' ); + $css->add_property( 'padding', generate_padding_css( $spacing_settings['content_top'], $spacing_settings['content_right'], $spacing_settings['content_bottom'], $spacing_settings['content_left'] ) ); + } + + $css->set_selector( '.editor-styles-wrapper a.button, .wp-block-button__link:not(.has-background)' ); + $css->add_property( 'color', $color_settings['form_button_text_color'] ); + $css->add_property( 'background-color', $color_settings['form_button_background_color'] ); + + $css->set_selector( '.editor-styles-wrapper a.button:hover, .editor-styles-wrapper a.button:focus, .wp-block-button__link:not(.has-background):active, .wp-block-button__link:not(.has-background):focus, .wp-block-button__link:not(.has-background):hover' ); + $css->add_property( 'color', $color_settings['form_button_text_color_hover'] ); + $css->add_property( 'background-color', $color_settings['form_button_background_color_hover'] ); + + $body_family = generate_get_font_family_css( 'font_body', 'generate_settings', generate_get_default_fonts() ); + $h1_family = generate_get_font_family_css( 'font_heading_1', 'generate_settings', generate_get_default_fonts() ); + $h2_family = generate_get_font_family_css( 'font_heading_2', 'generate_settings', generate_get_default_fonts() ); + $h3_family = generate_get_font_family_css( 'font_heading_3', 'generate_settings', generate_get_default_fonts() ); + $h4_family = generate_get_font_family_css( 'font_heading_4', 'generate_settings', generate_get_default_fonts() ); + $h5_family = generate_get_font_family_css( 'font_heading_5', 'generate_settings', generate_get_default_fonts() ); + $h6_family = generate_get_font_family_css( 'font_heading_6', 'generate_settings', generate_get_default_fonts() ); + $buttons_family = generate_get_font_family_css( 'font_buttons', 'generate_settings', generate_get_default_fonts() ); + + $css->set_selector( 'body.gutenberg-editor-page .block-editor-block-list__block, body .editor-styles-wrapper' ); + $css->add_property( 'font-family', $body_family ); + $css->add_property( 'font-size', absint( $font_settings['body_font_size'] ), false, 'px' ); + + if ( $color_settings['content_text_color'] ) { + $css->add_property( 'color', $color_settings['content_text_color'] ); + } else { + $css->add_property( 'color', generate_get_option( 'text_color' ) ); + } + + $css->set_selector( '.content-title-visibility' ); + + if ( $color_settings['content_text_color'] ) { + $css->add_property( 'color', $color_settings['content_text_color'] ); + } else { + $css->add_property( 'color', generate_get_option( 'text_color' ) ); + } + + $css->set_selector( 'body .editor-styles-wrapper, body .editor-styles-wrapper p, body .editor-styles-wrapper .mce-content-body' ); + $css->add_property( 'line-height', floatval( $font_settings['body_line_height'] ) ); + + $css->set_selector( 'body .editor-styles-wrapper p' ); + $css->add_property( 'margin-top', '0px' ); + $css->add_property( 'margin-bottom', $font_settings['paragraph_margin'], false, 'em' ); + + $css->set_selector( 'body .editor-styles-wrapper h1, .wp-block-heading h1.editor-rich-text__tinymce, .editor-post-title__block .editor-post-title__input' ); + $css->add_property( 'font-family', 'inherit' === $h1_family || '' === $h1_family ? $body_family : $h1_family ); + $css->add_property( 'font-weight', $font_settings['heading_1_weight'] ); + $css->add_property( 'text-transform', $font_settings['heading_1_transform'] ); + $css->add_property( 'font-size', absint( $font_settings['heading_1_font_size'] ), false, 'px' ); + $css->add_property( 'line-height', floatval( $font_settings['heading_1_line_height'] ), false, 'em' ); + $css->add_property( 'margin-bottom', floatval( $font_settings['heading_1_margin_bottom'] ), false, 'px' ); + $css->add_property( 'margin-top', '0' ); + + if ( $color_settings['h1_color'] ) { + $css->add_property( 'color', $color_settings['h1_color'] ); + } elseif ( $color_settings['content_text_color'] ) { + $css->add_property( 'color', $color_settings['content_text_color'] ); + } else { + $css->add_property( 'color', generate_get_option( 'text_color' ) ); + } + + if ( $color_settings['content_title_color'] ) { + $css->set_selector( '.editor-post-title__block .editor-post-title__input' ); + $css->add_property( 'color', $color_settings['content_title_color'] ); + } + + $css->set_selector( 'body .editor-styles-wrapper h2, .wp-block-heading h2.editor-rich-text__tinymce' ); + $css->add_property( 'font-family', $h2_family ); + $css->add_property( 'font-weight', $font_settings['heading_2_weight'] ); + $css->add_property( 'text-transform', $font_settings['heading_2_transform'] ); + $css->add_property( 'font-size', absint( $font_settings['heading_2_font_size'] ), false, 'px' ); + $css->add_property( 'line-height', floatval( $font_settings['heading_2_line_height'] ), false, 'em' ); + $css->add_property( 'margin-bottom', floatval( $font_settings['heading_2_margin_bottom'] ), false, 'px' ); + $css->add_property( 'margin-top', '0' ); + + if ( $color_settings['h2_color'] ) { + $css->add_property( 'color', $color_settings['h2_color'] ); + } elseif ( $color_settings['content_text_color'] ) { + $css->add_property( 'color', $color_settings['content_text_color'] ); + } else { + $css->add_property( 'color', generate_get_option( 'text_color' ) ); + } + + $css->set_selector( 'body .editor-styles-wrapper h3, .wp-block-heading h3.editor-rich-text__tinymce' ); + $css->add_property( 'font-family', $h3_family ); + $css->add_property( 'font-weight', $font_settings['heading_3_weight'] ); + $css->add_property( 'text-transform', $font_settings['heading_3_transform'] ); + $css->add_property( 'font-size', absint( $font_settings['heading_3_font_size'] ), false, 'px' ); + $css->add_property( 'line-height', floatval( $font_settings['heading_3_line_height'] ), false, 'em' ); + $css->add_property( 'margin-bottom', floatval( $font_settings['heading_3_margin_bottom'] ), false, 'px' ); + $css->add_property( 'margin-top', '0' ); + + if ( $color_settings['h3_color'] ) { + $css->add_property( 'color', $color_settings['h3_color'] ); + } elseif ( $color_settings['content_text_color'] ) { + $css->add_property( 'color', $color_settings['content_text_color'] ); + } else { + $css->add_property( 'color', generate_get_option( 'text_color' ) ); + } + + $css->set_selector( 'body .editor-styles-wrapper h4, .wp-block-heading h4.editor-rich-text__tinymce' ); + $css->add_property( 'font-family', $h4_family ); + $css->add_property( 'font-weight', $font_settings['heading_4_weight'] ); + $css->add_property( 'text-transform', $font_settings['heading_4_transform'] ); + $css->add_property( 'margin-bottom', '20px' ); + $css->add_property( 'margin-top', '0' ); + + if ( '' !== $font_settings['heading_4_font_size'] ) { + $css->add_property( 'font-size', absint( $font_settings['heading_4_font_size'] ), false, 'px' ); + } else { + $css->add_property( 'font-size', 'inherit' ); + } + + if ( '' !== $font_settings['heading_4_line_height'] ) { + $css->add_property( 'line-height', floatval( $font_settings['heading_4_line_height'] ), false, 'em' ); + } + + if ( $color_settings['h4_color'] ) { + $css->add_property( 'color', $color_settings['h4_color'] ); + } elseif ( $color_settings['content_text_color'] ) { + $css->add_property( 'color', $color_settings['content_text_color'] ); + } else { + $css->add_property( 'color', generate_get_option( 'text_color' ) ); + } + + $css->set_selector( 'body .editor-styles-wrapper h5, .wp-block-heading h5.editor-rich-text__tinymce' ); + $css->add_property( 'font-family', $h5_family ); + $css->add_property( 'font-weight', $font_settings['heading_5_weight'] ); + $css->add_property( 'text-transform', $font_settings['heading_5_transform'] ); + $css->add_property( 'margin-bottom', '20px' ); + $css->add_property( 'margin-top', '0' ); + + if ( '' !== $font_settings['heading_5_font_size'] ) { + $css->add_property( 'font-size', absint( $font_settings['heading_5_font_size'] ), false, 'px' ); + } else { + $css->add_property( 'font-size', 'inherit' ); + } + + if ( '' !== $font_settings['heading_5_line_height'] ) { + $css->add_property( 'line-height', floatval( $font_settings['heading_5_line_height'] ), false, 'em' ); + } + + if ( $color_settings['h5_color'] ) { + $css->add_property( 'color', $color_settings['h5_color'] ); + } elseif ( $color_settings['content_text_color'] ) { + $css->add_property( 'color', $color_settings['content_text_color'] ); + } else { + $css->add_property( 'color', generate_get_option( 'text_color' ) ); + } + + $css->set_selector( 'body .editor-styles-wrapper h6, .wp-block-heading h6.editor-rich-text__tinymce' ); + $css->add_property( 'font-family', $h6_family ); + $css->add_property( 'font-weight', $font_settings['heading_6_weight'] ); + $css->add_property( 'text-transform', $font_settings['heading_6_transform'] ); + $css->add_property( 'margin-bottom', '20px' ); + $css->add_property( 'margin-top', '0' ); + + if ( '' !== $font_settings['heading_6_font_size'] ) { + $css->add_property( 'font-size', absint( $font_settings['heading_6_font_size'] ), false, 'px' ); + } else { + $css->add_property( 'font-size', 'inherit' ); + } + + if ( '' !== $font_settings['heading_6_line_height'] ) { + $css->add_property( 'line-height', floatval( $font_settings['heading_6_line_height'] ), false, 'em' ); + } + + if ( $color_settings['h6_color'] ) { + $css->add_property( 'color', $color_settings['h6_color'] ); + } elseif ( $color_settings['content_text_color'] ) { + $css->add_property( 'color', $color_settings['content_text_color'] ); + } else { + $css->add_property( 'color', generate_get_option( 'text_color' ) ); + } + + $css->set_selector( '.editor-styles-wrapper a.button, .block-editor-block-list__layout .wp-block-button .wp-block-button__link' ); + $css->add_property( 'font-family', $buttons_family ); + $css->add_property( 'font-weight', $font_settings['buttons_font_weight'] ); + $css->add_property( 'text-transform', $font_settings['buttons_font_transform'] ); + + if ( '' !== $font_settings['buttons_font_size'] ) { + $css->add_property( 'font-size', absint( $font_settings['buttons_font_size'] ), false, 'px' ); + } + + if ( version_compare( $GLOBALS['wp_version'], '5.7-alpha.1', '>' ) ) { + $css->set_selector( '.block-editor__container .edit-post-visual-editor' ); + $css->add_property( 'background-color', generate_get_option( 'background_color' ) ); + + $css->set_selector( '.block-editor__container .editor-styles-wrapper' ); + + if ( $color_settings['content_background_color'] ) { + $css->add_property( 'background-color', $color_settings['content_background_color'] ); + } else { + $css->add_property( 'background-color', generate_get_option( 'background_color' ) ); + } + } else { + $css->set_selector( 'body .editor-styles-wrapper' ); + $css->add_property( 'background-color', generate_get_option( 'background_color' ) ); + + if ( $color_settings['content_background_color'] ) { + $body_background = generate_get_option( 'background_color' ); + $content_background = $color_settings['content_background_color']; + + $css->add_property( 'background', 'linear-gradient(' . $content_background . ',' . $content_background . '), linear-gradient(' . $body_background . ',' . $body_background . ')' ); + } + } + + $css->set_selector( '.block-editor-block-list__block a, .block-editor-block-list__block a:visited' ); + + if ( $color_settings['content_link_color'] ) { + $css->add_property( 'color', $color_settings['content_link_color'] ); + } else { + $css->add_property( 'color', generate_get_option( 'link_color' ) ); + } + + $css->set_selector( '.block-editor-block-list__block a:hover, .block-editor-block-list__block a:focus, .block-editor-block-list__block a:active' ); + + if ( $color_settings['content_link_hover_color'] ) { + $css->add_property( 'color', $color_settings['content_link_hover_color'] ); + } else { + $css->add_property( 'color', generate_get_option( 'link_color_hover' ) ); + } + + return $css->css_output(); +} diff --git a/wp-content/themes/generatepress/inc/class-theme-update.php b/wp-content/themes/generatepress/inc/class-theme-update.php index 734663e6..c83e726c 100644 --- a/wp-content/themes/generatepress/inc/class-theme-update.php +++ b/wp-content/themes/generatepress/inc/class-theme-update.php @@ -1,327 +1,327 @@ - 'font', - 'structure' => 'floats', - 'hide_tagline' => '', - 'container_width' => '1100', - 'nav_position_setting' => 'nav-below-header', - 'container_alignment' => 'boxes', - 'background_color' => '#efefef', - 'text_color' => '#3a3a3a', - 'header_text_color' => '#3a3a3a', - 'header_link_color' => '#3a3a3a', - 'navigation_background_color' => '#222222', - 'navigation_text_color' => '#ffffff', - 'navigation_background_hover_color' => '#3f3f3f', - 'navigation_text_hover_color' => '#ffffff', - 'navigation_background_current_color' => '#3f3f3f', - 'navigation_text_current_color' => '#ffffff', - 'subnavigation_background_color' => '#3f3f3f', - 'subnavigation_text_color' => '#ffffff', - 'subnavigation_background_hover_color' => '#4f4f4f', - 'subnavigation_text_hover_color' => '#ffffff', - 'subnavigation_background_current_color' => '#4f4f4f', - 'subnavigation_text_current_color' => '#ffffff', - 'sidebar_widget_title_color' => '#000000', - 'site_title_font_size' => '45', - 'mobile_site_title_font_size' => '30', - 'form_button_background_color' => '#666666', - 'form_button_background_color_hover' => '#3f3f3f', - 'footer_background_color' => '#222222', - 'footer_link_hover_color' => '#606060', - 'entry_meta_link_color' => '#595959', - 'entry_meta_link_color_hover' => '#1e73be', - 'blog_post_title_color' => '', - 'blog_post_title_hover_color' => '', - 'heading_1_font_size' => '40', - 'mobile_heading_1_font_size' => '30', - 'heading_1_weight' => '300', - 'heading_2_font_size' => '30', - 'mobile_heading_2_font_size' => '25', - 'heading_2_weight' => '300', - 'heading_3_font_size' => '20', - 'mobile_heading_3_font_size' => '', - 'heading_4_font_size' => '', - 'mobile_heading_4_font_size' => '', - 'heading_5_font_size' => '', - 'mobile_heading_5_font_size' => '', - ); - - foreach ( $old_defaults as $key => $value ) { - if ( ! isset( $settings[ $key ] ) ) { - $settings[ $key ] = $value; - $update_options = true; - } - } - - if ( $update_options ) { - update_option( 'generate_settings', $settings ); - } - - $spacing_settings = get_option( 'generate_spacing_settings', array() ); - $update_spacing_options = false; - - $old_spacing_defaults = array( - 'left_sidebar_width' => '25', - 'right_sidebar_width' => '25', - 'top_bar_right' => '10', - 'top_bar_left' => '10', - 'mobile_top_bar_right' => '', - 'mobile_top_bar_left' => '', - 'header_top' => '40', - 'header_bottom' => '40', - 'mobile_header_right' => '', - 'mobile_header_left' => '', - 'mobile_widget_top' => '', - 'mobile_widget_right' => '', - 'mobile_widget_bottom' => '', - 'mobile_widget_left' => '', - 'mobile_footer_widget_container_top' => '', - 'mobile_footer_widget_container_right' => '', - 'mobile_footer_widget_container_bottom' => '', - 'mobile_footer_widget_container_left' => '', - 'footer_right' => '20', - 'footer_left' => '20', - 'mobile_footer_right' => '10', - 'mobile_footer_left' => '10', - ); - - foreach ( $old_spacing_defaults as $key => $value ) { - if ( ! isset( $spacing_settings[ $key ] ) ) { - $spacing_settings[ $key ] = $value; - $update_spacing_options = true; - } - } - - if ( $update_spacing_options ) { - update_option( 'generate_spacing_settings', $spacing_settings ); - } - - if ( $update_options || $update_spacing_options ) { - delete_option( 'generate_dynamic_css_output' ); - delete_option( 'generate_dynamic_css_cached_version' ); - - // Reset our dynamic CSS file updated time so it regenerates. - $dynamic_css_data = get_option( 'generatepress_dynamic_css_data', array() ); - - if ( ! empty( $dynamic_css_data ) ) { - if ( isset( $dynamic_css_data['updated_time'] ) ) { - unset( $dynamic_css_data['updated_time'] ); - } - - update_option( 'generatepress_dynamic_css_data', $dynamic_css_data ); - } - } - } -} - -GeneratePress_Theme_Update::get_instance(); + 'font', + 'structure' => 'floats', + 'hide_tagline' => '', + 'container_width' => '1100', + 'nav_position_setting' => 'nav-below-header', + 'container_alignment' => 'boxes', + 'background_color' => '#efefef', + 'text_color' => '#3a3a3a', + 'header_text_color' => '#3a3a3a', + 'header_link_color' => '#3a3a3a', + 'navigation_background_color' => '#222222', + 'navigation_text_color' => '#ffffff', + 'navigation_background_hover_color' => '#3f3f3f', + 'navigation_text_hover_color' => '#ffffff', + 'navigation_background_current_color' => '#3f3f3f', + 'navigation_text_current_color' => '#ffffff', + 'subnavigation_background_color' => '#3f3f3f', + 'subnavigation_text_color' => '#ffffff', + 'subnavigation_background_hover_color' => '#4f4f4f', + 'subnavigation_text_hover_color' => '#ffffff', + 'subnavigation_background_current_color' => '#4f4f4f', + 'subnavigation_text_current_color' => '#ffffff', + 'sidebar_widget_title_color' => '#000000', + 'site_title_font_size' => '45', + 'mobile_site_title_font_size' => '30', + 'form_button_background_color' => '#666666', + 'form_button_background_color_hover' => '#3f3f3f', + 'footer_background_color' => '#222222', + 'footer_link_hover_color' => '#606060', + 'entry_meta_link_color' => '#595959', + 'entry_meta_link_color_hover' => '#1e73be', + 'blog_post_title_color' => '', + 'blog_post_title_hover_color' => '', + 'heading_1_font_size' => '40', + 'mobile_heading_1_font_size' => '30', + 'heading_1_weight' => '300', + 'heading_2_font_size' => '30', + 'mobile_heading_2_font_size' => '25', + 'heading_2_weight' => '300', + 'heading_3_font_size' => '20', + 'mobile_heading_3_font_size' => '', + 'heading_4_font_size' => '', + 'mobile_heading_4_font_size' => '', + 'heading_5_font_size' => '', + 'mobile_heading_5_font_size' => '', + ); + + foreach ( $old_defaults as $key => $value ) { + if ( ! isset( $settings[ $key ] ) ) { + $settings[ $key ] = $value; + $update_options = true; + } + } + + if ( $update_options ) { + update_option( 'generate_settings', $settings ); + } + + $spacing_settings = get_option( 'generate_spacing_settings', array() ); + $update_spacing_options = false; + + $old_spacing_defaults = array( + 'left_sidebar_width' => '25', + 'right_sidebar_width' => '25', + 'top_bar_right' => '10', + 'top_bar_left' => '10', + 'mobile_top_bar_right' => '', + 'mobile_top_bar_left' => '', + 'header_top' => '40', + 'header_bottom' => '40', + 'mobile_header_right' => '', + 'mobile_header_left' => '', + 'mobile_widget_top' => '', + 'mobile_widget_right' => '', + 'mobile_widget_bottom' => '', + 'mobile_widget_left' => '', + 'mobile_footer_widget_container_top' => '', + 'mobile_footer_widget_container_right' => '', + 'mobile_footer_widget_container_bottom' => '', + 'mobile_footer_widget_container_left' => '', + 'footer_right' => '20', + 'footer_left' => '20', + 'mobile_footer_right' => '10', + 'mobile_footer_left' => '10', + ); + + foreach ( $old_spacing_defaults as $key => $value ) { + if ( ! isset( $spacing_settings[ $key ] ) ) { + $spacing_settings[ $key ] = $value; + $update_spacing_options = true; + } + } + + if ( $update_spacing_options ) { + update_option( 'generate_spacing_settings', $spacing_settings ); + } + + if ( $update_options || $update_spacing_options ) { + delete_option( 'generate_dynamic_css_output' ); + delete_option( 'generate_dynamic_css_cached_version' ); + + // Reset our dynamic CSS file updated time so it regenerates. + $dynamic_css_data = get_option( 'generatepress_dynamic_css_data', array() ); + + if ( ! empty( $dynamic_css_data ) ) { + if ( isset( $dynamic_css_data['updated_time'] ) ) { + unset( $dynamic_css_data['updated_time'] ); + } + + update_option( 'generatepress_dynamic_css_data', $dynamic_css_data ); + } + } + } +} + +GeneratePress_Theme_Update::get_instance(); diff --git a/wp-content/themes/generatepress/inc/css-output.php b/wp-content/themes/generatepress/inc/css-output.php index dad6ebbe..3e31e101 100644 --- a/wp-content/themes/generatepress/inc/css-output.php +++ b/wp-content/themes/generatepress/inc/css-output.php @@ -1,1216 +1,1226 @@ - section using the Theme Customizer. - * - * @since 0.1 - */ - function generate_base_css() { - $settings = wp_parse_args( - get_option( 'generate_settings', array() ), - generate_get_defaults() - ); - - $css = new GeneratePress_CSS(); - - $css->set_selector( 'body' ); - $css->add_property( 'background-color', $settings['background_color'] ); - $css->add_property( 'color', $settings['text_color'] ); - - $css->set_selector( 'a' ); - $css->add_property( 'color', $settings['link_color'] ); - - $css->set_selector( 'a:visited' )->add_property( 'color', $settings['link_color_visited'] ); - - $css->set_selector( 'a:hover, a:focus, a:active' ); - $css->add_property( 'color', $settings['link_color_hover'] ); - - if ( generate_is_using_flexbox() ) { - if ( 1200 !== (int) $settings['container_width'] ) { - $css->set_selector( '.grid-container' )->add_property( 'max-width', absint( $settings['container_width'] ), false, 'px' ); - } - } else { - $css->set_selector( 'body .grid-container' )->add_property( 'max-width', absint( $settings['container_width'] ), false, 'px' ); - } - - if ( apply_filters( 'generate_do_group_inner_container_style', true ) ) { - $css->set_selector( '.wp-block-group__inner-container' ); - $css->add_property( 'max-width', absint( $settings['container_width'] ), false, 'px' ); - $css->add_property( 'margin-left', 'auto' ); - $css->add_property( 'margin-right', 'auto' ); - } - - $nav_drop_point = generate_get_option( 'nav_drop_point' ); - $nav_location = generate_get_navigation_location(); - - if ( ( 'nav-float-right' === $nav_location || 'nav-float-left' === $nav_location ) && $nav_drop_point ) { - $media_query = sprintf( - '(max-width: %1$s) and %2$s', - absint( $nav_drop_point ) . 'px', - apply_filters( 'generate_not_mobile_menu_media_query', '(min-width: 769px)' ) - ); - - $css->start_media_query( $media_query ); - $css->set_selector( '.inside-header' ); - $css->add_property( 'display', '-ms-flexbox' ); - $css->add_property( 'display', 'flex' ); - - $css->add_property( '-ms-flex-direction', 'column' ); - $css->add_property( 'flex-direction', 'column' ); - - $css->add_property( '-ms-flex-align', 'center' ); - $css->add_property( 'align-items', 'center' ); - - $css->set_selector( '.site-logo, .site-branding' ); - $css->add_property( 'margin-bottom', '1.5em' ); - - $css->set_selector( '#site-navigation' ); - $css->add_property( 'margin', '0 auto' ); - - $css->set_selector( '.header-widget' ); - $css->add_property( 'margin-top', '1.5em' ); - - // phpcs:ignore Generic.WhiteSpace.ScopeIndent.IncorrectExact -- Indented inside media query. - if ( 'nav-float-left' === generate_get_option( 'nav_position_setting' ) ) { - $css->set_selector( '.nav-float-left .site-logo,.nav-float-left .site-branding,.nav-float-left .header-widget' ); - $css->add_property( '-webkit-box-ordinal-group', 'initial' ); - $css->add_property( '-ms-flex-order', 'initial' ); - $css->add_property( 'order', 'initial' ); - } // phpcs:ignore Generic.WhiteSpace.ScopeIndent.IncorrectExact -- Indented inside media query. - $css->stop_media_query(); - } - - if ( generate_get_option( 'logo_width' ) ) { - $css->set_selector( '.site-header .header-image' ); - $css->add_property( 'width', absint( generate_get_option( 'logo_width' ) ), false, 'px' ); - } - - if ( generate_get_option( 'back_to_top' ) ) { - $css->set_selector( '.generate-back-to-top' ); - $css->add_property( 'font-size', '20px' ); - $css->add_property( 'border-radius', '3px' ); - $css->add_property( 'position', 'fixed' ); - $css->add_property( 'bottom', '30px' ); - $css->add_property( 'right', '30px' ); - $css->add_property( 'line-height', '40px' ); - $css->add_property( 'width', '40px' ); - $css->add_property( 'text-align', 'center' ); - $css->add_property( 'z-index', '10' ); - $css->add_property( 'transition', 'opacity 300ms ease-in-out' ); - } - - if ( 'enable' === generate_get_option( 'nav_search' ) ) { - $css->set_selector( '.navigation-search' ); - $css->add_property( 'position', 'absolute' ); - $css->add_property( 'left', '-99999px' ); - $css->add_property( 'pointer-events', 'none' ); - $css->add_property( 'visibility', 'hidden' ); - $css->add_property( 'z-index', '20' ); - $css->add_property( 'width', '100%' ); - $css->add_property( 'top', '0' ); - $css->add_property( 'transition', 'opacity 100ms ease-in-out' ); - $css->add_property( 'opacity', '0' ); - - $css->set_selector( '.navigation-search.nav-search-active' ); - $css->add_property( 'left', '0' ); - $css->add_property( 'right', '0' ); - $css->add_property( 'pointer-events', 'auto' ); - $css->add_property( 'visibility', 'visible' ); - $css->add_property( 'opacity', '1' ); - - $css->set_selector( '.navigation-search input[type="search"]' ); - $css->add_property( 'outline', '0' ); - $css->add_property( 'border', '0' ); - $css->add_property( 'vertical-align', 'bottom' ); - $css->add_property( 'line-height', '1' ); - $css->add_property( 'opacity', '0.9' ); - $css->add_property( 'width', '100%' ); - $css->add_property( 'z-index', '20' ); - $css->add_property( 'border-radius', '0' ); - $css->add_property( '-webkit-appearance', 'none' ); - $css->add_property( 'height', '60px' ); - - $css->set_selector( '.navigation-search input::-ms-clear' ); - $css->add_property( 'display', 'none' ); - $css->add_property( 'width', '0' ); - $css->add_property( 'height', '0' ); - - $css->set_selector( '.navigation-search input::-ms-reveal' ); - $css->add_property( 'display', 'none' ); - $css->add_property( 'width', '0' ); - $css->add_property( 'height', '0' ); - - $css->set_selector( '.navigation-search input::-webkit-search-decoration, .navigation-search input::-webkit-search-cancel-button, .navigation-search input::-webkit-search-results-button, .navigation-search input::-webkit-search-results-decoration' ); - $css->add_property( 'display', 'none' ); - - if ( ! generate_is_using_flexbox() ) { - $css->set_selector( '.main-navigation li.search-item' ); - $css->add_property( 'z-index', '21' ); - - $css->set_selector( 'li.search-item.active' ); - $css->add_property( 'transition', 'opacity 100ms ease-in-out' ); - - $css->set_selector( '.nav-left-sidebar .main-navigation li.search-item.active,.nav-right-sidebar .main-navigation li.search-item.active' ); - $css->add_property( 'width', 'auto' ); - $css->add_property( 'display', 'inline-block' ); - $css->add_property( 'float', 'right' ); - } - - $css->set_selector( '.gen-sidebar-nav .navigation-search' ); - $css->add_property( 'top', 'auto' ); - $css->add_property( 'bottom', '0' ); - } - - if ( 'click' === generate_get_option( 'nav_dropdown_type' ) || 'click-arrow' === generate_get_option( 'nav_dropdown_type' ) ) { - $css->set_selector( '.dropdown-click .main-navigation ul ul' ); - $css->add_property( 'display', 'none' ); - $css->add_property( 'visibility', 'hidden' ); - - $css->set_selector( '.dropdown-click .main-navigation ul ul ul.toggled-on' ); - $css->add_property( 'left', '0' ); - $css->add_property( 'top', 'auto' ); - $css->add_property( 'position', 'relative' ); - - $css->set_selector( '.dropdown-click .main-navigation ul.toggled-on, .dropdown-click .main-navigation ul li.sfHover > ul.toggled-on' ); - $css->add_property( 'display', 'block' ); - $css->add_property( 'left', 'auto' ); - $css->add_property( 'right', 'auto' ); - $css->add_property( 'opacity', '1' ); - $css->add_property( 'visibility', 'visible' ); - $css->add_property( 'pointer-events', 'auto' ); - $css->add_property( 'height', 'auto' ); - $css->add_property( 'overflow', 'visible' ); - - $css->set_selector( '.dropdown-click .main-navigation.sub-menu-left .sub-menu.toggled-on, .dropdown-click .main-navigation.sub-menu-left ul li.sfHover > ul.toggled-on' ); - $css->add_property( 'right', '0' ); - - $css->set_selector( '.dropdown-click nav ul ul ul' ); - $css->add_property( 'background-color', 'transparent' ); - - $css->set_selector( '.dropdown-click .widget-area .main-navigation ul ul' ); - $css->add_property( 'top', 'auto' ); - $css->add_property( 'position', 'absolute' ); - $css->add_property( 'float', 'none' ); - $css->add_property( 'width', '100%' ); - $css->add_property( 'left', '-99999px' ); - - $css->set_selector( '.dropdown-click .widget-area .main-navigation ul ul.toggled-on' ); - $css->add_property( 'position', 'relative' ); - $css->add_property( 'left', '0' ); - $css->add_property( 'right', '0' ); - - $css->set_selector( '.dropdown-click .widget-area.sidebar .main-navigation ul li.sfHover ul, .dropdown-click .widget-area.sidebar .main-navigation ul li:hover ul' ); - $css->add_property( 'right', '0' ); - $css->add_property( 'left', '0' ); - - $css->set_selector( '.dropdown-click .sfHover > a > .dropdown-menu-toggle > .gp-icon svg' ); - $css->add_property( 'transform', 'rotate(180deg)' ); - } - - do_action( 'generate_base_css', $css ); - - return apply_filters( 'generate_base_css_output', $css->css_output() ); - } -} - -if ( ! function_exists( 'generate_advanced_css' ) ) { - /** - * Generate the CSS in the section using the Theme Customizer. - * - * @since 0.1 - */ - function generate_advanced_css() { - $settings = wp_parse_args( - get_option( 'generate_settings', array() ), - generate_get_color_defaults() - ); - - $css = new GeneratePress_CSS(); - - $css->set_selector( '.top-bar' ); - $css->add_property( 'background-color', $settings['top_bar_background_color'] ); - $css->add_property( 'color', $settings['top_bar_text_color'] ); - - $css->set_selector( '.top-bar a' ); - $css->add_property( 'color', $settings['top_bar_link_color'] ); - - $css->set_selector( '.top-bar a:hover' ); - $css->add_property( 'color', $settings['top_bar_link_color_hover'] ); - - $css->set_selector( '.site-header' ); - $css->add_property( 'background-color', $settings['header_background_color'] ); - $css->add_property( 'color', $settings['header_text_color'] ); - - $css->set_selector( '.site-header a' ); - $css->add_property( 'color', $settings['header_link_color'] ); - - $css->set_selector( '.site-header a:hover' ); - $css->add_property( 'color', $settings['header_link_hover_color'] ); - - $css->set_selector( '.main-title a,.main-title a:hover' ); - $css->add_property( 'color', $settings['site_title_color'] ); - - $css->set_selector( '.site-description' ); - $css->add_property( 'color', $settings['site_tagline_color'] ); - - if ( $settings['navigation_background_color'] === $settings['header_background_color'] ) { - $css->set_selector( '.mobile-menu-control-wrapper .menu-toggle,.mobile-menu-control-wrapper .menu-toggle:hover,.mobile-menu-control-wrapper .menu-toggle:focus,.has-inline-mobile-toggle #site-navigation.toggled' ); - $css->add_property( 'background-color', 'rgba(0, 0, 0, 0.02)' ); - } - - $css->set_selector( '.main-navigation,.main-navigation ul ul' ); - $css->add_property( 'background-color', $settings['navigation_background_color'] ); - - $css->set_selector( '.main-navigation .main-nav ul li a,.menu-toggle, .main-navigation .menu-bar-items' ); - $css->add_property( 'color', $settings['navigation_text_color'] ); - - $css->set_selector( '.main-navigation .main-nav ul li:hover > a,.main-navigation .main-nav ul li:focus > a, .main-navigation .main-nav ul li.sfHover > a, .main-navigation .menu-bar-item:hover > a, .main-navigation .menu-bar-item.sfHover > a' ); - $css->add_property( 'color', $settings['navigation_text_hover_color'] ); - $css->add_property( 'background-color', $settings['navigation_background_hover_color'] ); - - if ( generate_is_using_flexbox() ) { - $css->set_selector( 'button.menu-toggle:hover,button.menu-toggle:focus' ); - } else { - $css->set_selector( 'button.menu-toggle:hover,button.menu-toggle:focus,.main-navigation .mobile-bar-items a,.main-navigation .mobile-bar-items a:hover,.main-navigation .mobile-bar-items a:focus' ); - } - - $css->add_property( 'color', $settings['navigation_text_color'] ); - - $css->set_selector( '.main-navigation .main-nav ul li[class*="current-menu-"] > a' ); - $css->add_property( 'color', $settings['navigation_text_current_color'] ); - $css->add_property( 'background-color', $settings['navigation_background_current_color'] ); - - $css->set_selector( '.main-navigation .main-nav ul li[class*="current-menu-"] > a:hover,.main-navigation .main-nav ul li[class*="current-menu-"].sfHover > a' ); - $css->add_property( 'color', $settings['navigation_text_current_color'] ); - $css->add_property( 'background-color', $settings['navigation_background_current_color'] ); - - $navigation_search_background = $settings['navigation_background_hover_color']; - $navigation_search_text = $settings['navigation_text_hover_color']; - - if ( '' !== $settings['navigation_search_background_color'] ) { - $navigation_search_background = $settings['navigation_search_background_color']; - } - - if ( '' !== $settings['navigation_search_text_color'] ) { - $navigation_search_text = $settings['navigation_search_text_color']; - } - - $css->set_selector( '.navigation-search input[type="search"],.navigation-search input[type="search"]:active, .navigation-search input[type="search"]:focus, .main-navigation .main-nav ul li.search-item.active > a, .main-navigation .menu-bar-items .search-item.active > a' ); - $css->add_property( 'color', $navigation_search_text ); - $css->add_property( 'background-color', $navigation_search_background ); - - if ( '' !== $settings['navigation_search_background_color'] ) { - $css->add_property( 'opacity', '1' ); - } - - $css->set_selector( '.main-navigation ul ul' ); - $css->add_property( 'background-color', $settings['subnavigation_background_color'] ); - - $css->set_selector( '.main-navigation .main-nav ul ul li a' ); - $css->add_property( 'color', $settings['subnavigation_text_color'] ); - - $css->set_selector( '.main-navigation .main-nav ul ul li:hover > a,.main-navigation .main-nav ul ul li:focus > a,.main-navigation .main-nav ul ul li.sfHover > a' ); - $css->add_property( 'color', $settings['subnavigation_text_hover_color'] ); - $css->add_property( 'background-color', $settings['subnavigation_background_hover_color'] ); - - $css->set_selector( '.main-navigation .main-nav ul ul li[class*="current-menu-"] > a' ); - $css->add_property( 'color', $settings['subnavigation_text_current_color'] ); - $css->add_property( 'background-color', $settings['subnavigation_background_current_color'] ); - - $css->set_selector( '.main-navigation .main-nav ul ul li[class*="current-menu-"] > a:hover,.main-navigation .main-nav ul ul li[class*="current-menu-"].sfHover > a' ); - $css->add_property( 'color', $settings['subnavigation_text_current_color'] ); - $css->add_property( 'background-color', $settings['subnavigation_background_current_color'] ); - - $css->set_selector( '.separate-containers .inside-article, .separate-containers .comments-area, .separate-containers .page-header, .one-container .container, .separate-containers .paging-navigation, .inside-page-header' ); - $css->add_property( 'color', $settings['content_text_color'] ); - $css->add_property( 'background-color', $settings['content_background_color'] ); - - $css->set_selector( '.inside-article a,.paging-navigation a,.comments-area a,.page-header a' ); - $css->add_property( 'color', $settings['content_link_color'] ); - - $css->set_selector( '.inside-article a:hover,.paging-navigation a:hover,.comments-area a:hover,.page-header a:hover' ); - $css->add_property( 'color', $settings['content_link_hover_color'] ); - - $css->set_selector( '.entry-header h1,.page-header h1' ); - $css->add_property( 'color', $settings['content_title_color'] ); - - $css->set_selector( '.entry-title a' ); - $css->add_property( 'color', $settings['blog_post_title_color'] ); - - $css->set_selector( '.entry-title a:hover' ); - $css->add_property( 'color', $settings['blog_post_title_hover_color'] ); - - $css->set_selector( '.entry-meta' ); - $css->add_property( 'color', $settings['entry_meta_text_color'] ); - - $css->set_selector( '.entry-meta a' ); - $css->add_property( 'color', $settings['entry_meta_link_color'] ); - - $css->set_selector( '.entry-meta a:hover' ); - $css->add_property( 'color', $settings['entry_meta_link_color_hover'] ); - - $css->set_selector( 'h1' ); - $css->add_property( 'color', $settings['h1_color'] ); - - $css->set_selector( 'h2' ); - $css->add_property( 'color', $settings['h2_color'] ); - - $css->set_selector( 'h3' ); - $css->add_property( 'color', $settings['h3_color'] ); - - $css->set_selector( 'h4' ); - $css->add_property( 'color', $settings['h4_color'] ); - - $css->set_selector( 'h5' ); - $css->add_property( 'color', $settings['h5_color'] ); - - $css->set_selector( 'h6' ); - $css->add_property( 'color', $settings['h6_color'] ); - - $css->set_selector( '.sidebar .widget' ); - $css->add_property( 'color', $settings['sidebar_widget_text_color'] ); - $css->add_property( 'background-color', $settings['sidebar_widget_background_color'] ); - - $css->set_selector( '.sidebar .widget a' ); - $css->add_property( 'color', $settings['sidebar_widget_link_color'] ); - - $css->set_selector( '.sidebar .widget a:hover' ); - $css->add_property( 'color', $settings['sidebar_widget_link_hover_color'] ); - - $css->set_selector( '.sidebar .widget .widget-title' ); - $css->add_property( 'color', $settings['sidebar_widget_title_color'] ); - - $css->set_selector( '.footer-widgets' ); - $css->add_property( 'color', $settings['footer_widget_text_color'] ); - $css->add_property( 'background-color', $settings['footer_widget_background_color'] ); - - $css->set_selector( '.footer-widgets a' ); - $css->add_property( 'color', $settings['footer_widget_link_color'] ); - - $css->set_selector( '.footer-widgets a:hover' ); - $css->add_property( 'color', $settings['footer_widget_link_hover_color'] ); - - $css->set_selector( '.footer-widgets .widget-title' ); - $css->add_property( 'color', $settings['footer_widget_title_color'] ); - - $css->set_selector( '.site-info' ); - $css->add_property( 'color', $settings['footer_text_color'] ); - $css->add_property( 'background-color', $settings['footer_background_color'] ); - - $css->set_selector( '.site-info a' ); - $css->add_property( 'color', $settings['footer_link_color'] ); - - $css->set_selector( '.site-info a:hover' ); - $css->add_property( 'color', $settings['footer_link_hover_color'] ); - - $css->set_selector( '.footer-bar .widget_nav_menu .current-menu-item a' ); - $css->add_property( 'color', $settings['footer_link_hover_color'] ); - - $css->set_selector( 'input[type="text"],input[type="email"],input[type="url"],input[type="password"],input[type="search"],input[type="tel"],input[type="number"],textarea,select' ); - $css->add_property( 'color', $settings['form_text_color'] ); - $css->add_property( 'background-color', $settings['form_background_color'] ); - $css->add_property( 'border-color', $settings['form_border_color'] ); - - $css->set_selector( 'input[type="text"]:focus,input[type="email"]:focus,input[type="url"]:focus,input[type="password"]:focus,input[type="search"]:focus,input[type="tel"]:focus,input[type="number"]:focus,textarea:focus,select:focus' ); - $css->add_property( 'color', $settings['form_text_color_focus'] ); - $css->add_property( 'background-color', $settings['form_background_color_focus'] ); - $css->add_property( 'border-color', $settings['form_border_color_focus'] ); - - $css->set_selector( 'button,html input[type="button"],input[type="reset"],input[type="submit"],a.button,a.wp-block-button__link:not(.has-background)' ); - $css->add_property( 'color', $settings['form_button_text_color'] ); - $css->add_property( 'background-color', $settings['form_button_background_color'] ); - - $css->set_selector( 'button:hover,html input[type="button"]:hover,input[type="reset"]:hover,input[type="submit"]:hover,a.button:hover,button:focus,html input[type="button"]:focus,input[type="reset"]:focus,input[type="submit"]:focus,a.button:focus,a.wp-block-button__link:not(.has-background):active,a.wp-block-button__link:not(.has-background):focus,a.wp-block-button__link:not(.has-background):hover' ); - $css->add_property( 'color', $settings['form_button_text_color_hover'] ); - $css->add_property( 'background-color', $settings['form_button_background_color_hover'] ); - - $css->set_selector( 'a.generate-back-to-top' ); - $css->add_property( 'background-color', $settings['back_to_top_background_color'] ); - $css->add_property( 'color', $settings['back_to_top_text_color'] ); - - $css->set_selector( 'a.generate-back-to-top:hover,a.generate-back-to-top:focus' ); - $css->add_property( 'background-color', $settings['back_to_top_background_color_hover'] ); - $css->add_property( 'color', $settings['back_to_top_text_color_hover'] ); - - $css->start_media_query( generate_get_media_query( 'mobile-menu' ) ); - $css->set_selector( '.main-navigation .menu-bar-item:hover > a, .main-navigation .menu-bar-item.sfHover > a' ); - $css->add_property( 'background', 'none' ); - $css->add_property( 'color', $settings['navigation_text_color'] ); - $css->stop_media_query(); - - do_action( 'generate_colors_css', $css ); - - return apply_filters( 'generate_colors_css_output', $css->css_output() ); - } -} - -if ( ! function_exists( 'generate_font_css' ) ) { - /** - * Generate the CSS in the section using the Theme Customizer. - * - * @since 0.1 - */ - function generate_font_css() { - - $settings = wp_parse_args( - get_option( 'generate_settings', array() ), - generate_get_default_fonts() - ); - - $defaults = generate_get_default_fonts( false ); - - $css = new GeneratePress_CSS(); - - $body_family = generate_get_font_family_css( 'font_body', 'generate_settings', generate_get_default_fonts() ); - $top_bar_family = generate_get_font_family_css( 'font_top_bar', 'generate_settings', generate_get_default_fonts() ); - $site_title_family = generate_get_font_family_css( 'font_site_title', 'generate_settings', generate_get_default_fonts() ); - $site_tagline_family = generate_get_font_family_css( 'font_site_tagline', 'generate_settings', generate_get_default_fonts() ); - $navigation_family = generate_get_font_family_css( 'font_navigation', 'generate_settings', generate_get_default_fonts() ); - $widget_family = generate_get_font_family_css( 'font_widget_title', 'generate_settings', generate_get_default_fonts() ); - $h1_family = generate_get_font_family_css( 'font_heading_1', 'generate_settings', generate_get_default_fonts() ); - $h2_family = generate_get_font_family_css( 'font_heading_2', 'generate_settings', generate_get_default_fonts() ); - $h3_family = generate_get_font_family_css( 'font_heading_3', 'generate_settings', generate_get_default_fonts() ); - $h4_family = generate_get_font_family_css( 'font_heading_4', 'generate_settings', generate_get_default_fonts() ); - $h5_family = generate_get_font_family_css( 'font_heading_5', 'generate_settings', generate_get_default_fonts() ); - $h6_family = generate_get_font_family_css( 'font_heading_6', 'generate_settings', generate_get_default_fonts() ); - $footer_family = generate_get_font_family_css( 'font_footer', 'generate_settings', generate_get_default_fonts() ); - $buttons_family = generate_get_font_family_css( 'font_buttons', 'generate_settings', generate_get_default_fonts() ); - - $css->set_selector( 'body, button, input, select, textarea' ); - $css->add_property( 'font-family', $body_family ); - $css->add_property( 'font-weight', $settings['body_font_weight'], $defaults['body_font_weight'] ); - $css->add_property( 'text-transform', $settings['body_font_transform'], $defaults['body_font_transform'] ); - $css->add_property( 'font-size', $settings['body_font_size'], $defaults['body_font_size'], 'px' ); - - $css->set_selector( 'body' ); - $css->add_property( 'line-height', floatval( $settings['body_line_height'] ), $defaults['body_line_height'] ); - - $css->set_selector( 'p' ); - $css->add_property( 'margin-bottom', floatval( $settings['paragraph_margin'] ), $defaults['paragraph_margin'], 'em' ); - - $css->set_selector( '.entry-content > [class*="wp-block-"]:not(:last-child)' ); - $css->add_property( 'margin-bottom', floatval( $settings['paragraph_margin'] ), false, 'em' ); - - $css->set_selector( '.top-bar' ); - $css->add_property( 'font-family', $defaults['font_top_bar'] !== $settings['font_top_bar'] ? $top_bar_family : null ); - $css->add_property( 'font-weight', $settings['top_bar_font_weight'], $defaults['top_bar_font_weight'] ); - $css->add_property( 'text-transform', $settings['top_bar_font_transform'], $defaults['top_bar_font_transform'] ); - $css->add_property( 'font-size', absint( $settings['top_bar_font_size'] ), absint( $defaults['top_bar_font_size'] ), 'px' ); - - $css->set_selector( '.main-title' ); - $css->add_property( 'font-family', $defaults['font_site_title'] !== $settings['font_site_title'] ? $site_title_family : null ); - $css->add_property( 'font-weight', $settings['site_title_font_weight'], $defaults['site_title_font_weight'] ); - $css->add_property( 'text-transform', $settings['site_title_font_transform'], $defaults['site_title_font_transform'] ); - $css->add_property( 'font-size', absint( $settings['site_title_font_size'] ), $defaults['site_title_font_size'], 'px' ); - - $css->set_selector( '.site-description' ); - $css->add_property( 'font-family', $defaults['font_site_tagline'] !== $settings['font_site_tagline'] ? $site_tagline_family : null ); - $css->add_property( 'font-weight', $settings['site_tagline_font_weight'], $defaults['site_tagline_font_weight'] ); - $css->add_property( 'text-transform', $settings['site_tagline_font_transform'], $defaults['site_tagline_font_transform'] ); - - if ( ! empty( $settings['site_tagline_font_size'] ) ) { - $css->add_property( 'font-size', absint( $settings['site_tagline_font_size'] ), $defaults['site_tagline_font_size'], 'px' ); - } else { - $css->add_property( 'font-size', 'inherit' ); - } - - $css->set_selector( '.main-navigation a, .menu-toggle' ); - $css->add_property( 'font-family', $defaults['font_navigation'] !== $settings['font_navigation'] ? $navigation_family : null ); - $css->add_property( 'font-weight', $settings['navigation_font_weight'], $defaults['navigation_font_weight'] ); - $css->add_property( 'text-transform', $settings['navigation_font_transform'], $defaults['navigation_font_transform'] ); - - if ( ! empty( $settings['navigation_font_size'] ) ) { - $css->add_property( 'font-size', absint( $settings['navigation_font_size'] ), $defaults['navigation_font_size'], 'px' ); - } else { - $css->add_property( 'font-size', 'inherit' ); - } - - if ( generate_is_using_flexbox() ) { - $css->set_selector( '.main-navigation .menu-bar-items' ); - - if ( ! empty( $settings['navigation_font_size'] ) ) { - $css->add_property( 'font-size', absint( $settings['navigation_font_size'] ), $defaults['navigation_font_size'], 'px' ); - } else { - $css->add_property( 'font-size', 'inherit' ); - } - } - - $css->set_selector( '.main-navigation .main-nav ul ul li a' ); - - if ( ! empty( $settings['navigation_font_size'] ) ) { - $subnav_font_size = $settings['navigation_font_size'] >= 17 ? $settings['navigation_font_size'] - 3 : $settings['navigation_font_size'] - 1; - $css->add_property( 'font-size', absint( $subnav_font_size ), false, 'px' ); - } - - $css->set_selector( '.widget-title' ); - $css->add_property( 'font-family', $defaults['font_widget_title'] !== $settings['font_widget_title'] ? $widget_family : null ); - $css->add_property( 'font-weight', $settings['widget_title_font_weight'], $defaults['widget_title_font_weight'] ); - $css->add_property( 'text-transform', $settings['widget_title_font_transform'], $defaults['widget_title_font_transform'] ); - - if ( ! empty( $settings['widget_title_font_size'] ) ) { - $css->add_property( 'font-size', $settings['widget_title_font_size'], $defaults['widget_title_font_size'], 'px' ); - } else { - $css->add_property( 'font-size', 'inherit' ); - } - - $css->add_property( 'margin-bottom', absint( $settings['widget_title_separator'] ), absint( $defaults['widget_title_separator'] ), 'px' ); - - $css->set_selector( '.sidebar .widget, .footer-widgets .widget' ); - - if ( ! empty( $settings['widget_content_font_size'] ) ) { - $css->add_property( 'font-size', absint( $settings['widget_content_font_size'] ), false, 'px' ); - } else { - $css->add_property( 'font-size', 'inherit' ); - } - - $css->set_selector( 'button:not(.menu-toggle),html input[type="button"],input[type="reset"],input[type="submit"],.button,.wp-block-button .wp-block-button__link' ); - $css->add_property( 'font-family', $defaults['font_buttons'] !== $settings['font_buttons'] ? $buttons_family : null ); - $css->add_property( 'font-weight', $settings['buttons_font_weight'], $defaults['buttons_font_weight'] ); - $css->add_property( 'text-transform', $settings['buttons_font_transform'], $defaults['buttons_font_transform'] ); - $css->add_property( 'font-size', absint( $settings['buttons_font_size'] ), $defaults['buttons_font_size'], 'px' ); - - $css->set_selector( 'h1' ); - $css->add_property( 'font-family', $defaults['font_heading_1'] !== $settings['font_heading_1'] ? $h1_family : null ); - $css->add_property( 'font-weight', $settings['heading_1_weight'], $defaults['heading_1_weight'] ); - $css->add_property( 'text-transform', $settings['heading_1_transform'], $defaults['heading_1_transform'] ); - $css->add_property( 'font-size', absint( $settings['heading_1_font_size'] ), $defaults['heading_1_font_size'], 'px' ); - $css->add_property( 'line-height', floatval( $settings['heading_1_line_height'] ), $defaults['heading_1_line_height'], 'em' ); - $css->add_property( 'margin-bottom', floatval( $settings['heading_1_margin_bottom'] ), $defaults['heading_1_margin_bottom'], 'px' ); - - $css->set_selector( 'h2' ); - $css->add_property( 'font-family', $defaults['font_heading_2'] !== $settings['font_heading_2'] ? $h2_family : null ); - $css->add_property( 'font-weight', $settings['heading_2_weight'], $defaults['heading_2_weight'] ); - $css->add_property( 'text-transform', $settings['heading_2_transform'], $defaults['heading_2_transform'] ); - $css->add_property( 'font-size', absint( $settings['heading_2_font_size'] ), $defaults['heading_2_font_size'], 'px' ); - $css->add_property( 'line-height', floatval( $settings['heading_2_line_height'] ), $defaults['heading_2_line_height'], 'em' ); - $css->add_property( 'margin-bottom', floatval( $settings['heading_2_margin_bottom'] ), $defaults['heading_2_margin_bottom'], 'px' ); - - $css->set_selector( 'h3' ); - $css->add_property( 'font-family', $defaults['font_heading_3'] !== $settings['font_heading_3'] ? $h3_family : null ); - $css->add_property( 'font-weight', $settings['heading_3_weight'], $defaults['heading_3_weight'] ); - $css->add_property( 'text-transform', $settings['heading_3_transform'], $defaults['heading_3_transform'] ); - $css->add_property( 'font-size', absint( $settings['heading_3_font_size'] ), $defaults['heading_3_font_size'], 'px' ); - $css->add_property( 'line-height', floatval( $settings['heading_3_line_height'] ), $defaults['heading_3_line_height'], 'em' ); - $css->add_property( 'margin-bottom', floatval( $settings['heading_3_margin_bottom'] ), $defaults['heading_3_margin_bottom'], 'px' ); - - $css->set_selector( 'h4' ); - $css->add_property( 'font-family', $defaults['font_heading_4'] !== $settings['font_heading_4'] ? $h4_family : null ); - $css->add_property( 'font-weight', $settings['heading_4_weight'], $defaults['heading_4_weight'] ); - $css->add_property( 'text-transform', $settings['heading_4_transform'], $defaults['heading_4_transform'] ); - - if ( ! empty( $settings['heading_4_font_size'] ) ) { - $css->add_property( 'font-size', absint( $settings['heading_4_font_size'] ), $defaults['heading_4_font_size'], 'px' ); - } else { - $css->add_property( 'font-size', 'inherit' ); - } - - if ( '' !== $settings['heading_4_line_height'] ) { - $css->add_property( 'line-height', floatval( $settings['heading_4_line_height'] ), $defaults['heading_4_line_height'], 'em' ); - } - - $css->set_selector( 'h5' ); - $css->add_property( 'font-family', $defaults['font_heading_5'] !== $settings['font_heading_5'] ? $h5_family : null ); - $css->add_property( 'font-weight', $settings['heading_5_weight'], $defaults['heading_5_weight'] ); - $css->add_property( 'text-transform', $settings['heading_5_transform'], $defaults['heading_5_transform'] ); - - if ( ! empty( $settings['heading_5_font_size'] ) ) { - $css->add_property( 'font-size', absint( $settings['heading_5_font_size'] ), $defaults['heading_5_font_size'], 'px' ); - } else { - $css->add_property( 'font-size', 'inherit' ); - } - - if ( '' !== $settings['heading_5_line_height'] ) { - $css->add_property( 'line-height', floatval( $settings['heading_5_line_height'] ), $defaults['heading_5_line_height'], 'em' ); - } - - $css->set_selector( 'h6' ); - $css->add_property( 'font-family', $defaults['font_heading_6'] !== $settings['font_heading_6'] ? $h6_family : null ); - $css->add_property( 'font-weight', $settings['heading_6_weight'], $defaults['heading_6_weight'] ); - $css->add_property( 'text-transform', $settings['heading_6_transform'], $defaults['heading_6_transform'] ); - $css->add_property( 'font-size', absint( $settings['heading_6_font_size'] ), $defaults['heading_6_font_size'], 'px' ); - - if ( '' !== $settings['heading_6_line_height'] ) { - $css->add_property( 'line-height', floatval( $settings['heading_6_line_height'] ), $defaults['heading_6_line_height'], 'em' ); - } - - $css->set_selector( '.site-info' ); - $css->add_property( 'font-family', $defaults['font_footer'] !== $settings['font_footer'] ? $footer_family : null ); - $css->add_property( 'font-weight', $settings['footer_weight'], $defaults['footer_weight'] ); - $css->add_property( 'text-transform', $settings['footer_transform'], $defaults['footer_transform'] ); - - if ( ! empty( $settings['footer_font_size'] ) ) { - $css->add_property( 'font-size', absint( $settings['footer_font_size'] ), $defaults['footer_font_size'], 'px' ); - } else { - $css->add_property( 'font-size', 'inherit' ); - } - - $css->start_media_query( generate_get_media_query( 'mobile' ) ); - $css->set_selector( '.main-title' ); - $css->add_property( 'font-size', absint( $settings['mobile_site_title_font_size'] ), false, 'px' ); - - $css->set_selector( 'h1' ); - $css->add_property( 'font-size', absint( $settings['mobile_heading_1_font_size'] ), false, 'px' ); - - $css->set_selector( 'h2' ); - $css->add_property( 'font-size', absint( $settings['mobile_heading_2_font_size'] ), false, 'px' ); - - $css->set_selector( 'h3' ); - $css->add_property( 'font-size', absint( $settings['mobile_heading_3_font_size'] ), false, 'px' ); - - $css->set_selector( 'h4' ); - $css->add_property( 'font-size', absint( $settings['mobile_heading_4_font_size'] ), false, 'px' ); - - $css->set_selector( 'h5' ); - $css->add_property( 'font-size', absint( $settings['mobile_heading_5_font_size'] ), false, 'px' ); - $css->stop_media_query(); - - do_action( 'generate_typography_css', $css ); - - return apply_filters( 'generate_typography_css_output', $css->css_output() ); - } -} - -if ( ! function_exists( 'generate_spacing_css' ) ) { - /** - * Write our dynamic CSS. - * - * @since 0.1 - */ - function generate_spacing_css() { - $settings = wp_parse_args( - get_option( 'generate_spacing_settings', array() ), - generate_spacing_get_defaults() - ); - - $defaults = generate_spacing_get_defaults( false ); - $sidebar_layout = generate_get_layout(); - - $css = new GeneratePress_CSS(); - - $css->set_selector( '.inside-top-bar' ); - $css->add_property( 'padding', generate_padding_css( $settings['top_bar_top'], $settings['top_bar_right'], $settings['top_bar_bottom'], $settings['top_bar_left'] ), generate_padding_css( $defaults['top_bar_top'], $defaults['top_bar_right'], $defaults['top_bar_bottom'], $defaults['top_bar_left'] ) ); - - if ( generate_is_using_flexbox() && 'boxes' === generate_get_option( 'container_alignment' ) ) { - $top_bar_padding = absint( $settings['top_bar_right'] ) + absint( $settings['top_bar_left'] ); - - $css->set_selector( '.inside-top-bar.grid-container' ); - $css->add_property( 'max-width', generate_get_option( 'container_width' ) + $top_bar_padding, false, 'px' ); - } - - $css->set_selector( '.inside-header' ); - $css->add_property( 'padding', generate_padding_css( $settings['header_top'], $settings['header_right'], $settings['header_bottom'], $settings['header_left'] ), generate_padding_css( $defaults['header_top'], $defaults['header_right'], $defaults['header_bottom'], $defaults['header_left'] ) ); - - if ( generate_is_using_flexbox() ) { - if ( 'boxes' === generate_get_option( 'container_alignment' ) ) { - $header_padding = absint( $settings['header_right'] ) + absint( $settings['header_left'] ); - - $css->set_selector( '.inside-header.grid-container' ); - $css->add_property( 'max-width', generate_get_option( 'container_width' ) + $header_padding, false, 'px' ); - } - - if ( 'text' === generate_get_option( 'container_alignment' ) ) { - $navigation_left_padding = absint( $settings['header_left'] ) - absint( $settings['menu_item'] ); - $navigation_right_padding = absint( $settings['header_right'] ) - absint( $settings['menu_item'] ); - - $css->set_selector( '.nav-below-header .main-navigation .inside-navigation.grid-container, .nav-above-header .main-navigation .inside-navigation.grid-container' ); - $css->add_property( 'padding', generate_padding_css( 0, $navigation_right_padding, 0, $navigation_left_padding ) ); - } - } - - $css->set_selector( '.separate-containers .inside-article, .separate-containers .comments-area, .separate-containers .page-header, .separate-containers .paging-navigation, .one-container .site-content, .inside-page-header, .wp-block-group__inner-container' ); - $css->add_property( 'padding', generate_padding_css( $settings['content_top'], $settings['content_right'], $settings['content_bottom'], $settings['content_left'] ), generate_padding_css( $defaults['content_top'], $defaults['content_right'], $defaults['content_bottom'], $defaults['content_left'] ) ); - - if ( generate_is_using_flexbox() ) { - $css->set_selector( '.separate-containers .paging-navigation' ); - $css->add_property( 'padding-top', '20px' ); - $css->add_property( 'padding-bottom', '20px' ); - } - - $content_padding = absint( $settings['content_right'] ) + absint( $settings['content_left'] ); - $css->set_selector( '.entry-content .alignwide, body:not(.no-sidebar) .entry-content .alignfull' ); - $css->add_property( 'margin-left', '-' . absint( $settings['content_left'] ) . 'px' ); - $css->add_property( 'width', 'calc(100% + ' . absint( $content_padding ) . 'px)' ); - $css->add_property( 'max-width', 'calc(100% + ' . absint( $content_padding ) . 'px)' ); - - if ( ! generate_is_using_flexbox() && 'text' === generate_get_option( 'container_alignment' ) ) { - $css->set_selector( '.container.grid-container' ); - $css->add_property( 'max-width', generate_get_option( 'container_width' ) + $content_padding, false, 'px' ); - } - - $css->set_selector( '.one-container.right-sidebar .site-main,.one-container.both-right .site-main' ); - $css->add_property( 'margin-right', absint( $settings['content_right'] ), absint( $defaults['content_right'] ), 'px' ); - - $css->set_selector( '.one-container.left-sidebar .site-main,.one-container.both-left .site-main' ); - $css->add_property( 'margin-left', absint( $settings['content_left'] ), absint( $defaults['content_left'] ), 'px' ); - - $css->set_selector( '.one-container.both-sidebars .site-main' ); - $css->add_property( 'margin', generate_padding_css( '0', $settings['content_right'], '0', $settings['content_left'] ), generate_padding_css( '0', $defaults['content_right'], '0', $defaults['content_left'] ) ); - - if ( generate_is_using_flexbox() ) { - $css->set_selector( '.sidebar .widget, .page-header, .widget-area .main-navigation, .site-main > *' ); - } else { - $css->set_selector( '.separate-containers .widget, .separate-containers .site-main > *, .separate-containers .page-header, .widget-area .main-navigation' ); - } - - $css->add_property( 'margin-bottom', absint( $settings['separator'] ), absint( $defaults['separator'] ), 'px' ); - - $css->set_selector( '.separate-containers .site-main' ); - $css->add_property( 'margin', absint( $settings['separator'] ), $defaults['separator'], 'px' ); - - if ( generate_is_using_flexbox() ) { - $css->set_selector( '.both-right .inside-left-sidebar,.both-left .inside-left-sidebar' ); - $css->add_property( 'margin-right', absint( $settings['separator'] / 2 ), absint( $defaults['separator'] / 2 ), 'px' ); - - $css->set_selector( '.both-right .inside-right-sidebar,.both-left .inside-right-sidebar' ); - $css->add_property( 'margin-left', absint( $settings['separator'] / 2 ), absint( $defaults['separator'] / 2 ), 'px' ); - - $css->set_selector( '.one-container.archive .post:not(:last-child), .one-container.blog .post:not(:last-child)' ); - $css->add_property( 'padding-bottom', absint( $settings['content_bottom'] ), absint( $defaults['content_bottom'] ), 'px' ); - } else { - $css->set_selector( '.both-right.separate-containers .inside-left-sidebar' ); - $css->add_property( 'margin-right', absint( $settings['separator'] / 2 ), absint( $defaults['separator'] / 2 ), 'px' ); - - $css->set_selector( '.both-right.separate-containers .inside-right-sidebar' ); - $css->add_property( 'margin-left', absint( $settings['separator'] / 2 ), absint( $defaults['separator'] / 2 ), 'px' ); - - $css->set_selector( '.both-left.separate-containers .inside-left-sidebar' ); - $css->add_property( 'margin-right', absint( $settings['separator'] / 2 ), absint( $defaults['separator'] / 2 ), 'px' ); - - $css->set_selector( '.both-left.separate-containers .inside-right-sidebar' ); - $css->add_property( 'margin-left', absint( $settings['separator'] / 2 ), absint( $defaults['separator'] / 2 ), 'px' ); - } - - if ( generate_is_using_flexbox() ) { - $css->set_selector( '.separate-containers .featured-image' ); - } else { - $css->set_selector( '.separate-containers .page-header-image, .separate-containers .page-header-contained, .separate-containers .page-header-image-single, .separate-containers .page-header-content-single' ); - } - - $css->add_property( 'margin-top', absint( $settings['separator'] ), absint( $defaults['separator'] ), 'px' ); - - $css->set_selector( '.separate-containers .inside-right-sidebar, .separate-containers .inside-left-sidebar' ); - $css->add_property( 'margin-top', absint( $settings['separator'] ), absint( $defaults['separator'] ), 'px' ); - $css->add_property( 'margin-bottom', absint( $settings['separator'] ), absint( $defaults['separator'] ), 'px' ); - - if ( generate_is_using_flexbox() ) { - $css->set_selector( '.main-navigation .main-nav ul li a,.menu-toggle,.main-navigation .menu-bar-item > a' ); - } else { - $css->set_selector( '.main-navigation .main-nav ul li a,.menu-toggle,.main-navigation .mobile-bar-items a' ); - } - - $css->add_property( 'padding-left', absint( $settings['menu_item'] ), absint( $defaults['menu_item'] ), 'px' ); - $css->add_property( 'padding-right', absint( $settings['menu_item'] ), absint( $defaults['menu_item'] ), 'px' ); - $css->add_property( 'line-height', absint( $settings['menu_item_height'] ), absint( $defaults['menu_item_height'] ), 'px' ); - - $css->set_selector( '.main-navigation .main-nav ul ul li a' ); - $css->add_property( 'padding', generate_padding_css( $settings['sub_menu_item_height'], $settings['menu_item'], $settings['sub_menu_item_height'], $settings['menu_item'] ), generate_padding_css( $defaults['sub_menu_item_height'], $defaults['menu_item'], $defaults['sub_menu_item_height'], $defaults['menu_item'] ) ); - - $css->set_selector( '.main-navigation ul ul' ); - $css->add_property( 'width', absint( $settings['sub_menu_width'] ), absint( $defaults['sub_menu_width'] ), 'px' ); - - $css->set_selector( '.navigation-search input[type="search"]' ); - $css->add_property( 'height', absint( $settings['menu_item_height'] ), absint( $defaults['menu_item_height'] ), 'px' ); - - $css->set_selector( '.rtl .menu-item-has-children .dropdown-menu-toggle' ); - $css->add_property( 'padding-left', absint( $settings['menu_item'] ), false, 'px' ); - - $css->set_selector( '.menu-item-has-children .dropdown-menu-toggle' ); - $css->add_property( 'padding-right', absint( $settings['menu_item'] ), absint( $defaults['menu_item'] ), 'px' ); - - $css->set_selector( '.menu-item-has-children ul .dropdown-menu-toggle' ); - $css->add_property( 'padding-top', absint( $settings['sub_menu_item_height'] ), absint( $defaults['sub_menu_item_height'] ), 'px' ); - $css->add_property( 'padding-bottom', absint( $settings['sub_menu_item_height'] ), absint( $defaults['sub_menu_item_height'] ), 'px' ); - $css->add_property( 'margin-top', '-' . absint( $settings['sub_menu_item_height'] ), '-' . absint( $defaults['sub_menu_item_height'] ), 'px' ); - - $css->set_selector( '.rtl .main-navigation .main-nav ul li.menu-item-has-children > a' ); - $css->add_property( 'padding-right', absint( $settings['menu_item'] ), false, 'px' ); - - $css->set_selector( '.widget-area .widget' ); - $css->add_property( 'padding', generate_padding_css( $settings['widget_top'], $settings['widget_right'], $settings['widget_bottom'], $settings['widget_left'] ), generate_padding_css( $defaults['widget_top'], $defaults['widget_right'], $defaults['widget_bottom'], $defaults['widget_left'] ) ); - - if ( generate_is_using_flexbox() ) { - $css->set_selector( '.footer-widgets-container' ); - $css->add_property( 'padding', generate_padding_css( $settings['footer_widget_container_top'], $settings['footer_widget_container_right'], $settings['footer_widget_container_bottom'], $settings['footer_widget_container_left'] ), generate_padding_css( $defaults['footer_widget_container_top'], $defaults['footer_widget_container_right'], $defaults['footer_widget_container_bottom'], $defaults['footer_widget_container_left'] ) ); - - if ( 'boxes' === generate_get_option( 'container_alignment' ) ) { - $footer_widgets_padding = absint( $settings['footer_widget_container_right'] ) + absint( $settings['footer_widget_container_left'] ); - - $css->set_selector( '.footer-widgets-container.grid-container' ); - $css->add_property( 'max-width', generate_get_option( 'container_width' ) + $footer_widgets_padding, false, 'px' ); - } - } else { - $css->set_selector( '.footer-widgets' ); - $css->add_property( 'padding', generate_padding_css( $settings['footer_widget_container_top'], $settings['footer_widget_container_right'], $settings['footer_widget_container_bottom'], $settings['footer_widget_container_left'] ), generate_padding_css( $defaults['footer_widget_container_top'], $defaults['footer_widget_container_right'], $defaults['footer_widget_container_bottom'], $defaults['footer_widget_container_left'] ) ); - } - - $css->set_selector( '.site-footer .footer-widgets-container .inner-padding' ); - $css->add_property( 'padding', generate_padding_css( '0', '0', '0', $settings['footer_widget_separator'] ), generate_padding_css( '0', '0', '0', $defaults['footer_widget_separator'] ) ); - - $css->set_selector( '.site-footer .footer-widgets-container .inside-footer-widgets' ); - $css->add_property( 'margin-left', '-' . absint( $settings['footer_widget_separator'] ), '-' . absint( $defaults['footer_widget_separator'] ), 'px' ); - - if ( generate_is_using_flexbox() ) { - $css->set_selector( '.inside-site-info' ); - $css->add_property( 'padding', generate_padding_css( $settings['footer_top'], $settings['footer_right'], $settings['footer_bottom'], $settings['footer_left'] ), generate_padding_css( $defaults['footer_top'], $defaults['footer_right'], $defaults['footer_bottom'], $defaults['footer_left'] ) ); - - if ( 'boxes' === generate_get_option( 'container_alignment' ) ) { - $site_info_padding = absint( $settings['footer_right'] ) + absint( $settings['footer_left'] ); - - $css->set_selector( '.inside-site-info.grid-container' ); - $css->add_property( 'max-width', generate_get_option( 'container_width' ) + $site_info_padding, false, 'px' ); - } - } else { - $css->set_selector( '.site-info' ); - $css->add_property( 'padding', generate_padding_css( $settings['footer_top'], $settings['footer_right'], $settings['footer_bottom'], $settings['footer_left'] ), generate_padding_css( $defaults['footer_top'], $defaults['footer_right'], $defaults['footer_bottom'], $defaults['footer_left'] ) ); - } - - $css->start_media_query( generate_get_media_query( 'mobile' ) ); - $css->set_selector( '.separate-containers .inside-article, .separate-containers .comments-area, .separate-containers .page-header, .separate-containers .paging-navigation, .one-container .site-content, .inside-page-header, .wp-block-group__inner-container' ); - $css->add_property( 'padding', generate_padding_css( $settings['mobile_content_top'], $settings['mobile_content_right'], $settings['mobile_content_bottom'], $settings['mobile_content_left'] ) ); - - $css->set_selector( '.inside-top-bar' ); - - if ( '' !== $settings['mobile_top_bar_top'] ) { - $css->add_property( 'padding-top', absint( $settings['mobile_top_bar_top'] ), false, 'px' ); - } - - if ( '' !== $settings['mobile_top_bar_right'] ) { - $css->add_property( 'padding-right', absint( $settings['mobile_top_bar_right'] ), false, 'px' ); - } - - if ( '' !== $settings['mobile_top_bar_bottom'] ) { - $css->add_property( 'padding-bottom', absint( $settings['mobile_top_bar_bottom'] ), false, 'px' ); - } - - if ( '' !== $settings['mobile_top_bar_left'] ) { - $css->add_property( 'padding-left', absint( $settings['mobile_top_bar_left'] ), false, 'px' ); - } - - $css->set_selector( '.inside-header' ); - - if ( '' !== $settings['mobile_header_top'] ) { - $css->add_property( 'padding-top', absint( $settings['mobile_header_top'] ), false, 'px' ); - } - - if ( '' !== $settings['mobile_header_right'] ) { - $css->add_property( 'padding-right', absint( $settings['mobile_header_right'] ), false, 'px' ); - } - - if ( '' !== $settings['mobile_header_bottom'] ) { - $css->add_property( 'padding-bottom', absint( $settings['mobile_header_bottom'] ), false, 'px' ); - } - - if ( '' !== $settings['mobile_header_left'] ) { - $css->add_property( 'padding-left', absint( $settings['mobile_header_left'] ), false, 'px' ); - } - - $css->set_selector( '.widget-area .widget' ); - if ( '' !== $settings['mobile_widget_top'] ) { - $css->add_property( 'padding-top', absint( $settings['mobile_widget_top'] ), false, 'px' ); - } - - if ( '' !== $settings['mobile_widget_right'] ) { - $css->add_property( 'padding-right', absint( $settings['mobile_widget_right'] ), false, 'px' ); - } - - if ( '' !== $settings['mobile_widget_bottom'] ) { - $css->add_property( 'padding-bottom', absint( $settings['mobile_widget_bottom'] ), false, 'px' ); - } - - if ( '' !== $settings['mobile_widget_left'] ) { - $css->add_property( 'padding-left', absint( $settings['mobile_widget_left'] ), false, 'px' ); - } - - if ( generate_is_using_flexbox() ) { - $css->set_selector( '.footer-widgets-container' ); - } else { - $css->set_selector( '.footer-widgets' ); - } - - if ( '' !== $settings['mobile_footer_widget_container_top'] ) { - $css->add_property( 'padding-top', absint( $settings['mobile_footer_widget_container_top'] ), false, 'px' ); - } - - if ( '' !== $settings['mobile_footer_widget_container_right'] ) { - $css->add_property( 'padding-right', absint( $settings['mobile_footer_widget_container_right'] ), false, 'px' ); - } - - if ( '' !== $settings['mobile_footer_widget_container_bottom'] ) { - $css->add_property( 'padding-bottom', absint( $settings['mobile_footer_widget_container_bottom'] ), false, 'px' ); - } - - if ( '' !== $settings['mobile_footer_widget_container_left'] ) { - $css->add_property( 'padding-left', absint( $settings['mobile_footer_widget_container_left'] ), false, 'px' ); - } - - if ( generate_is_using_flexbox() ) { - $css->set_selector( '.inside-site-info' ); - } else { - $css->set_selector( '.site-info' ); - } - - if ( '' !== $settings['mobile_footer_top'] ) { - $css->add_property( 'padding-top', absint( $settings['mobile_footer_top'] ), false, 'px' ); - } - - if ( '' !== $settings['mobile_footer_right'] ) { - $css->add_property( 'padding-right', absint( $settings['mobile_footer_right'] ), false, 'px' ); - } - - if ( '' !== $settings['mobile_footer_bottom'] ) { - $css->add_property( 'padding-bottom', absint( $settings['mobile_footer_bottom'] ), false, 'px' ); - } - - if ( '' !== $settings['mobile_footer_left'] ) { - $css->add_property( 'padding-left', absint( $settings['mobile_footer_left'] ), false, 'px' ); - } - - $mobile_content_padding = absint( $settings['mobile_content_right'] ) + absint( $settings['mobile_content_left'] ); - $css->set_selector( '.entry-content .alignwide, body:not(.no-sidebar) .entry-content .alignfull' ); - $css->add_property( 'margin-left', '-' . absint( $settings['mobile_content_left'] ) . 'px' ); - $css->add_property( 'width', 'calc(100% + ' . absint( $mobile_content_padding ) . 'px)' ); - $css->add_property( 'max-width', 'calc(100% + ' . absint( $mobile_content_padding ) . 'px)' ); - - if ( '' !== $settings['mobile_separator'] ) { - if ( generate_is_using_flexbox() ) { - $css->set_selector( '.sidebar .widget, .page-header, .widget-area .main-navigation, .site-main > *' ); - } else { - $css->set_selector( '.separate-containers .widget, .separate-containers .site-main > *, .separate-containers .page-header' ); - } - - $css->add_property( 'margin-bottom', absint( $settings['mobile_separator'] ), false, 'px' ); - - $css->set_selector( '.separate-containers .site-main' ); - $css->add_property( 'margin', absint( $settings['mobile_separator'] ), false, 'px' ); - - if ( generate_is_using_flexbox() ) { - $css->set_selector( '.separate-containers .featured-image' ); - } else { - $css->set_selector( '.separate-containers .page-header-image, .separate-containers .page-header-image-single' ); - } - - $css->add_property( 'margin-top', absint( $settings['mobile_separator'] ), false, 'px' ); - - $css->set_selector( '.separate-containers .inside-right-sidebar, .separate-containers .inside-left-sidebar' ); - $css->add_property( 'margin-top', absint( $settings['mobile_separator'] ), false, 'px' ); - $css->add_property( 'margin-bottom', absint( $settings['mobile_separator'] ), false, 'px' ); - - if ( generate_is_using_flexbox() ) { - $css->set_selector( '.one-container .site-main .paging-navigation' ); - $css->add_property( 'margin-bottom', absint( $settings['mobile_separator'] ), false, 'px' ); - } - } else { - if ( generate_is_using_flexbox() ) { - $css->set_selector( '.one-container .site-main .paging-navigation' ); - $css->add_property( 'margin-bottom', absint( $settings['separator'] ), false, 'px' ); - } - } - $css->stop_media_query(); - - // Add spacing back where dropdown arrow should be. - // Old versions of WP don't get nice things. - if ( version_compare( $GLOBALS['wp_version'], '4.4', '<' ) ) { - $css->set_selector( '.main-navigation .main-nav ul li.menu-item-has-children>a, .secondary-navigation .main-nav ul li.menu-item-has-children>a' ); - $css->add_property( 'padding-right', absint( $settings['menu_item'] ), absint( $defaults['menu_item'] ), 'px' ); - } - - $output = ''; - - if ( ! generate_is_using_flexbox() ) { - $generate_settings = wp_parse_args( - get_option( 'generate_settings', array() ), - generate_get_color_defaults() - ); - - // Find out if the content background color and sidebar widget background color is the same. - $sidebar = strtoupper( $generate_settings['sidebar_widget_background_color'] ); - $content = strtoupper( $generate_settings['content_background_color'] ); - - // phpcs:ignore WordPress.PHP.StrictComparisons.LooseComparison - $colors_match = ( ( $sidebar == $content ) || '' == $sidebar ) ? true : false; - - // If they're all 40 (default), remove the padding when one container is set. - // This way, the user can still adjust the padding and it will work (unless they want 40px padding). - // We'll also remove the padding if there's no color difference between the widgets and content background color. - // phpcs:ignore WordPress.PHP.StrictComparisons.LooseComparison - if ( ( '40' == $settings['widget_top'] && '40' == $settings['widget_right'] && '40' == $settings['widget_bottom'] && '40' == $settings['widget_left'] ) && $colors_match ) { - $output .= '.one-container .sidebar .widget{padding:0px;}'; - } - } - - do_action( 'generate_spacing_css', $css ); - - return apply_filters( 'generate_spacing_css_output', $css->css_output() . $output ); - } -} - -/** - * Generates any CSS that can't be cached (can change from page to page). - * - * @since 2.0 - */ -function generate_no_cache_dynamic_css() { - $css = new GeneratePress_CSS(); - - if ( generate_is_using_flexbox() ) { - $right_sidebar_width = apply_filters( 'generate_right_sidebar_width', '30' ); - $left_sidebar_width = apply_filters( 'generate_left_sidebar_width', '30' ); - - $css->set_selector( '.is-right-sidebar' ); - $css->add_property( 'width', absint( $right_sidebar_width ) . '%' ); - - $css->set_selector( '.is-left-sidebar' ); - $css->add_property( 'width', absint( $left_sidebar_width ) . '%' ); - - $content_width = 100; - $sidebar_layout = generate_get_layout(); - - switch ( $sidebar_layout ) { - case 'right-sidebar': - $content_width = $content_width - absint( $right_sidebar_width ); - break; - - case 'left-sidebar': - $content_width = $content_width - absint( $left_sidebar_width ); - break; - - case 'both-sidebars': - case 'both-right': - case 'both-left': - $content_width = $content_width - absint( $right_sidebar_width ) - absint( $left_sidebar_width ); - break; - } - - $css->set_selector( '.site-content .content-area' ); - $css->add_property( 'width', absint( $content_width ) . '%' ); - } - - $css->start_media_query( generate_get_media_query( 'mobile-menu' ) ); - - if ( generate_is_using_flexbox() ) { - $css->set_selector( '.main-navigation .menu-toggle,.sidebar-nav-mobile:not(#sticky-placeholder)' ); - $css->add_property( 'display', 'block' ); - - $css->set_selector( '.main-navigation ul,.gen-sidebar-nav,.main-navigation:not(.slideout-navigation):not(.toggled) .main-nav > ul,.has-inline-mobile-toggle #site-navigation .inside-navigation > *:not(.navigation-search):not(.main-nav)' ); - $css->add_property( 'display', 'none' ); - - $css->set_selector( '.nav-align-right .inside-navigation,.nav-align-center .inside-navigation' ); - $css->add_property( 'justify-content', 'space-between' ); - - if ( is_rtl() ) { - $css->set_selector( '.rtl .nav-align-right .inside-navigation,.rtl .nav-align-center .inside-navigation, .rtl .nav-align-left .inside-navigation' ); - $css->add_property( 'justify-content', 'space-between' ); - } - - if ( generate_has_inline_mobile_toggle() ) { - $css->set_selector( '.has-inline-mobile-toggle .mobile-menu-control-wrapper' ); - $css->add_property( 'display', 'flex' ); - $css->add_property( 'flex-wrap', 'wrap' ); - - $css->set_selector( '.has-inline-mobile-toggle .inside-header' ); - $css->add_property( 'flex-direction', 'row' ); - $css->add_property( 'text-align', 'left' ); - $css->add_property( 'flex-wrap', 'wrap' ); - - $css->set_selector( '.has-inline-mobile-toggle .header-widget,.has-inline-mobile-toggle #site-navigation' ); - $css->add_property( 'flex-basis', '100%' ); - - $css->set_selector( '.nav-float-left .has-inline-mobile-toggle #site-navigation' ); - $css->add_property( 'order', '10' ); - } - } else { - $css->set_selector( '.main-navigation .menu-toggle,.main-navigation .mobile-bar-items,.sidebar-nav-mobile:not(#sticky-placeholder)' ); - $css->add_property( 'display', 'block' ); - - $css->set_selector( '.main-navigation ul,.gen-sidebar-nav' ); - $css->add_property( 'display', 'none' ); - - $css->set_selector( '[class*="nav-float-"] .site-header .inside-header > *' ); - $css->add_property( 'float', 'none' ); - $css->add_property( 'clear', 'both' ); - } - - $css->stop_media_query(); - - return $css->css_output(); -} - -/** - * Get all of our dynamic CSS to be cached/added to a file. - * - * @since 3.0.0 - */ -function generate_get_dynamic_css() { - $css = generate_base_css() . generate_font_css() . generate_advanced_css() . generate_spacing_css(); - - return apply_filters( 'generate_dynamic_css', $css ); -} - -add_action( 'wp_enqueue_scripts', 'generate_enqueue_dynamic_css', 50 ); -/** - * Enqueue our dynamic CSS. - * - * @since 2.0 - */ -function generate_enqueue_dynamic_css() { - if ( apply_filters( 'generate_using_dynamic_css_external_file', false ) ) { - $css = ''; - } elseif ( ! get_option( 'generate_dynamic_css_output', false ) || is_customize_preview() || apply_filters( 'generate_dynamic_css_skip_cache', false ) ) { - $css = generate_get_dynamic_css(); - } else { - $css = get_option( 'generate_dynamic_css_output' ) . '/* End cached CSS */'; - } - - $css = $css . generate_no_cache_dynamic_css(); - - wp_add_inline_style( 'generate-style', wp_strip_all_tags( $css ) ); -} - -add_action( 'init', 'generate_set_dynamic_css_cache' ); -/** - * Sets our dynamic CSS cache if it doesn't exist. - * - * If the theme version changed, bust the cache. - * - * @since 2.0 - */ -function generate_set_dynamic_css_cache() { - if ( apply_filters( 'generate_dynamic_css_skip_cache', false ) ) { - return; - } - - $cached_css = get_option( 'generate_dynamic_css_output', false ); - $cached_version = get_option( 'generate_dynamic_css_cached_version', '' ); - - if ( ! $cached_css || GENERATE_VERSION !== $cached_version ) { - $css = generate_base_css() . generate_font_css() . generate_advanced_css() . generate_spacing_css(); - - update_option( 'generate_dynamic_css_output', wp_strip_all_tags( $css ) ); - update_option( 'generate_dynamic_css_cached_version', esc_html( GENERATE_VERSION ) ); - } -} - -add_action( 'customize_save_after', 'generate_update_dynamic_css_cache' ); -/** - * Update our CSS cache when done saving Customizer options. - * - * @since 2.0 - */ -function generate_update_dynamic_css_cache() { - if ( apply_filters( 'generate_dynamic_css_skip_cache', false ) ) { - return; - } - - $css = generate_base_css() . generate_font_css() . generate_advanced_css() . generate_spacing_css(); - update_option( 'generate_dynamic_css_output', wp_strip_all_tags( $css ) ); -} + section using the Theme Customizer. + * + * @since 0.1 + */ + function generate_base_css() { + $settings = wp_parse_args( + get_option( 'generate_settings', array() ), + generate_get_defaults() + ); + + $css = new GeneratePress_CSS(); + + $css->set_selector( 'body' ); + $css->add_property( 'background-color', $settings['background_color'] ); + $css->add_property( 'color', $settings['text_color'] ); + + $css->set_selector( 'a' ); + $css->add_property( 'color', $settings['link_color'] ); + + $css->set_selector( 'a:visited' )->add_property( 'color', $settings['link_color_visited'] ); + + $css->set_selector( 'a:hover, a:focus, a:active' ); + $css->add_property( 'color', $settings['link_color_hover'] ); + + if ( generate_is_using_flexbox() ) { + if ( 1200 !== (int) $settings['container_width'] ) { + $css->set_selector( '.grid-container' )->add_property( 'max-width', absint( $settings['container_width'] ), false, 'px' ); + } + } else { + $css->set_selector( 'body .grid-container' )->add_property( 'max-width', absint( $settings['container_width'] ), false, 'px' ); + } + + if ( apply_filters( 'generate_do_group_inner_container_style', true ) ) { + $css->set_selector( '.wp-block-group__inner-container' ); + $css->add_property( 'max-width', absint( $settings['container_width'] ), false, 'px' ); + $css->add_property( 'margin-left', 'auto' ); + $css->add_property( 'margin-right', 'auto' ); + } + + $nav_drop_point = generate_get_option( 'nav_drop_point' ); + $nav_location = generate_get_navigation_location(); + + if ( ( 'nav-float-right' === $nav_location || 'nav-float-left' === $nav_location ) && $nav_drop_point ) { + $media_query = sprintf( + '(max-width: %1$s) and %2$s', + absint( $nav_drop_point ) . 'px', + apply_filters( 'generate_not_mobile_menu_media_query', '(min-width: 769px)' ) + ); + + $css->start_media_query( $media_query ); + $css->set_selector( '.inside-header' ); + $css->add_property( 'display', '-ms-flexbox' ); + $css->add_property( 'display', 'flex' ); + + $css->add_property( '-ms-flex-direction', 'column' ); + $css->add_property( 'flex-direction', 'column' ); + + $css->add_property( '-ms-flex-align', 'center' ); + $css->add_property( 'align-items', 'center' ); + + $css->set_selector( '.site-logo, .site-branding' ); + $css->add_property( 'margin-bottom', '1.5em' ); + + $css->set_selector( '#site-navigation' ); + $css->add_property( 'margin', '0 auto' ); + + $css->set_selector( '.header-widget' ); + $css->add_property( 'margin-top', '1.5em' ); + + // phpcs:ignore Generic.WhiteSpace.ScopeIndent.IncorrectExact -- Indented inside media query. + if ( 'nav-float-left' === generate_get_option( 'nav_position_setting' ) ) { + $css->set_selector( '.nav-float-left .site-logo,.nav-float-left .site-branding,.nav-float-left .header-widget' ); + $css->add_property( '-webkit-box-ordinal-group', 'initial' ); + $css->add_property( '-ms-flex-order', 'initial' ); + $css->add_property( 'order', 'initial' ); + } // phpcs:ignore Generic.WhiteSpace.ScopeIndent.IncorrectExact -- Indented inside media query. + $css->stop_media_query(); + } + + if ( generate_get_option( 'logo_width' ) ) { + $css->set_selector( '.site-header .header-image' ); + $css->add_property( 'width', absint( generate_get_option( 'logo_width' ) ), false, 'px' ); + } + + if ( generate_get_option( 'back_to_top' ) ) { + $css->set_selector( '.generate-back-to-top' ); + $css->add_property( 'font-size', '20px' ); + $css->add_property( 'border-radius', '3px' ); + $css->add_property( 'position', 'fixed' ); + $css->add_property( 'bottom', '30px' ); + $css->add_property( 'right', '30px' ); + $css->add_property( 'line-height', '40px' ); + $css->add_property( 'width', '40px' ); + $css->add_property( 'text-align', 'center' ); + $css->add_property( 'z-index', '10' ); + $css->add_property( 'transition', 'opacity 300ms ease-in-out' ); + } + + if ( 'enable' === generate_get_option( 'nav_search' ) ) { + $css->set_selector( '.navigation-search' ); + $css->add_property( 'position', 'absolute' ); + $css->add_property( 'left', '-99999px' ); + $css->add_property( 'pointer-events', 'none' ); + $css->add_property( 'visibility', 'hidden' ); + $css->add_property( 'z-index', '20' ); + $css->add_property( 'width', '100%' ); + $css->add_property( 'top', '0' ); + $css->add_property( 'transition', 'opacity 100ms ease-in-out' ); + $css->add_property( 'opacity', '0' ); + + $css->set_selector( '.navigation-search.nav-search-active' ); + $css->add_property( 'left', '0' ); + $css->add_property( 'right', '0' ); + $css->add_property( 'pointer-events', 'auto' ); + $css->add_property( 'visibility', 'visible' ); + $css->add_property( 'opacity', '1' ); + + $css->set_selector( '.navigation-search input[type="search"]' ); + $css->add_property( 'outline', '0' ); + $css->add_property( 'border', '0' ); + $css->add_property( 'vertical-align', 'bottom' ); + $css->add_property( 'line-height', '1' ); + $css->add_property( 'opacity', '0.9' ); + $css->add_property( 'width', '100%' ); + $css->add_property( 'z-index', '20' ); + $css->add_property( 'border-radius', '0' ); + $css->add_property( '-webkit-appearance', 'none' ); + $css->add_property( 'height', '60px' ); + + $css->set_selector( '.navigation-search input::-ms-clear' ); + $css->add_property( 'display', 'none' ); + $css->add_property( 'width', '0' ); + $css->add_property( 'height', '0' ); + + $css->set_selector( '.navigation-search input::-ms-reveal' ); + $css->add_property( 'display', 'none' ); + $css->add_property( 'width', '0' ); + $css->add_property( 'height', '0' ); + + $css->set_selector( '.navigation-search input::-webkit-search-decoration, .navigation-search input::-webkit-search-cancel-button, .navigation-search input::-webkit-search-results-button, .navigation-search input::-webkit-search-results-decoration' ); + $css->add_property( 'display', 'none' ); + + if ( ! generate_is_using_flexbox() ) { + $css->set_selector( '.main-navigation li.search-item' ); + $css->add_property( 'z-index', '21' ); + + $css->set_selector( 'li.search-item.active' ); + $css->add_property( 'transition', 'opacity 100ms ease-in-out' ); + + $css->set_selector( '.nav-left-sidebar .main-navigation li.search-item.active,.nav-right-sidebar .main-navigation li.search-item.active' ); + $css->add_property( 'width', 'auto' ); + $css->add_property( 'display', 'inline-block' ); + $css->add_property( 'float', 'right' ); + } + + $css->set_selector( '.gen-sidebar-nav .navigation-search' ); + $css->add_property( 'top', 'auto' ); + $css->add_property( 'bottom', '0' ); + } + + if ( 'click' === generate_get_option( 'nav_dropdown_type' ) || 'click-arrow' === generate_get_option( 'nav_dropdown_type' ) ) { + $css->set_selector( '.dropdown-click .main-navigation ul ul' ); + $css->add_property( 'display', 'none' ); + $css->add_property( 'visibility', 'hidden' ); + + $css->set_selector( '.dropdown-click .main-navigation ul ul ul.toggled-on' ); + $css->add_property( 'left', '0' ); + $css->add_property( 'top', 'auto' ); + $css->add_property( 'position', 'relative' ); + + $css->set_selector( '.dropdown-click .main-navigation ul.toggled-on, .dropdown-click .main-navigation ul li.sfHover > ul.toggled-on' ); + $css->add_property( 'display', 'block' ); + $css->add_property( 'left', 'auto' ); + $css->add_property( 'right', 'auto' ); + $css->add_property( 'opacity', '1' ); + $css->add_property( 'visibility', 'visible' ); + $css->add_property( 'pointer-events', 'auto' ); + $css->add_property( 'height', 'auto' ); + $css->add_property( 'overflow', 'visible' ); + + $css->set_selector( '.dropdown-click .main-navigation.sub-menu-left .sub-menu.toggled-on, .dropdown-click .main-navigation.sub-menu-left ul li.sfHover > ul.toggled-on' ); + $css->add_property( 'right', '0' ); + + $css->set_selector( '.dropdown-click nav ul ul ul' ); + $css->add_property( 'background-color', 'transparent' ); + + $css->set_selector( '.dropdown-click .widget-area .main-navigation ul ul' ); + $css->add_property( 'top', 'auto' ); + $css->add_property( 'position', 'absolute' ); + $css->add_property( 'float', 'none' ); + $css->add_property( 'width', '100%' ); + $css->add_property( 'left', '-99999px' ); + + $css->set_selector( '.dropdown-click .widget-area .main-navigation ul ul.toggled-on' ); + $css->add_property( 'position', 'relative' ); + $css->add_property( 'left', '0' ); + $css->add_property( 'right', '0' ); + + $css->set_selector( '.dropdown-click .widget-area.sidebar .main-navigation ul li.sfHover ul, .dropdown-click .widget-area.sidebar .main-navigation ul li:hover ul' ); + $css->add_property( 'right', '0' ); + $css->add_property( 'left', '0' ); + + $css->set_selector( '.dropdown-click .sfHover > a > .dropdown-menu-toggle > .gp-icon svg' ); + $css->add_property( 'transform', 'rotate(180deg)' ); + } + + do_action( 'generate_base_css', $css ); + + return apply_filters( 'generate_base_css_output', $css->css_output() ); + } +} + +if ( ! function_exists( 'generate_advanced_css' ) ) { + /** + * Generate the CSS in the section using the Theme Customizer. + * + * @since 0.1 + */ + function generate_advanced_css() { + $settings = wp_parse_args( + get_option( 'generate_settings', array() ), + generate_get_color_defaults() + ); + + $css = new GeneratePress_CSS(); + + $css->set_selector( '.top-bar' ); + $css->add_property( 'background-color', $settings['top_bar_background_color'] ); + $css->add_property( 'color', $settings['top_bar_text_color'] ); + + $css->set_selector( '.top-bar a' ); + $css->add_property( 'color', $settings['top_bar_link_color'] ); + + $css->set_selector( '.top-bar a:hover' ); + $css->add_property( 'color', $settings['top_bar_link_color_hover'] ); + + $css->set_selector( '.site-header' ); + $css->add_property( 'background-color', $settings['header_background_color'] ); + $css->add_property( 'color', $settings['header_text_color'] ); + + $css->set_selector( '.site-header a' ); + $css->add_property( 'color', $settings['header_link_color'] ); + + $css->set_selector( '.site-header a:hover' ); + $css->add_property( 'color', $settings['header_link_hover_color'] ); + + $css->set_selector( '.main-title a,.main-title a:hover' ); + $css->add_property( 'color', $settings['site_title_color'] ); + + $css->set_selector( '.site-description' ); + $css->add_property( 'color', $settings['site_tagline_color'] ); + + if ( $settings['navigation_background_color'] === $settings['header_background_color'] ) { + $css->set_selector( '.mobile-menu-control-wrapper .menu-toggle,.mobile-menu-control-wrapper .menu-toggle:hover,.mobile-menu-control-wrapper .menu-toggle:focus,.has-inline-mobile-toggle #site-navigation.toggled' ); + $css->add_property( 'background-color', 'rgba(0, 0, 0, 0.02)' ); + } + + $css->set_selector( '.main-navigation,.main-navigation ul ul' ); + $css->add_property( 'background-color', $settings['navigation_background_color'] ); + + $css->set_selector( '.main-navigation .main-nav ul li a,.menu-toggle, .main-navigation .menu-bar-items' ); + $css->add_property( 'color', $settings['navigation_text_color'] ); + + $css->set_selector( '.main-navigation .main-nav ul li:hover > a,.main-navigation .main-nav ul li:focus > a, .main-navigation .main-nav ul li.sfHover > a, .main-navigation .menu-bar-item:hover > a, .main-navigation .menu-bar-item.sfHover > a' ); + $css->add_property( 'color', $settings['navigation_text_hover_color'] ); + $css->add_property( 'background-color', $settings['navigation_background_hover_color'] ); + + if ( generate_is_using_flexbox() ) { + $css->set_selector( 'button.menu-toggle:hover,button.menu-toggle:focus' ); + } else { + $css->set_selector( 'button.menu-toggle:hover,button.menu-toggle:focus,.main-navigation .mobile-bar-items a,.main-navigation .mobile-bar-items a:hover,.main-navigation .mobile-bar-items a:focus' ); + } + + $css->add_property( 'color', $settings['navigation_text_color'] ); + + $css->set_selector( '.main-navigation .main-nav ul li[class*="current-menu-"] > a' ); + $css->add_property( 'color', $settings['navigation_text_current_color'] ); + $css->add_property( 'background-color', $settings['navigation_background_current_color'] ); + + $css->set_selector( '.main-navigation .main-nav ul li[class*="current-menu-"] > a:hover,.main-navigation .main-nav ul li[class*="current-menu-"].sfHover > a' ); + $css->add_property( 'color', $settings['navigation_text_current_color'] ); + $css->add_property( 'background-color', $settings['navigation_background_current_color'] ); + + $navigation_search_background = $settings['navigation_background_hover_color']; + $navigation_search_text = $settings['navigation_text_hover_color']; + + if ( '' !== $settings['navigation_search_background_color'] ) { + $navigation_search_background = $settings['navigation_search_background_color']; + } + + if ( '' !== $settings['navigation_search_text_color'] ) { + $navigation_search_text = $settings['navigation_search_text_color']; + } + + $css->set_selector( '.navigation-search input[type="search"],.navigation-search input[type="search"]:active, .navigation-search input[type="search"]:focus, .main-navigation .main-nav ul li.search-item.active > a, .main-navigation .menu-bar-items .search-item.active > a' ); + $css->add_property( 'color', $navigation_search_text ); + $css->add_property( 'background-color', $navigation_search_background ); + + if ( '' !== $settings['navigation_search_background_color'] ) { + $css->add_property( 'opacity', '1' ); + } + + $css->set_selector( '.main-navigation ul ul' ); + $css->add_property( 'background-color', $settings['subnavigation_background_color'] ); + + $css->set_selector( '.main-navigation .main-nav ul ul li a' ); + $css->add_property( 'color', $settings['subnavigation_text_color'] ); + + $css->set_selector( '.main-navigation .main-nav ul ul li:hover > a,.main-navigation .main-nav ul ul li:focus > a,.main-navigation .main-nav ul ul li.sfHover > a' ); + $css->add_property( 'color', $settings['subnavigation_text_hover_color'] ); + $css->add_property( 'background-color', $settings['subnavigation_background_hover_color'] ); + + $css->set_selector( '.main-navigation .main-nav ul ul li[class*="current-menu-"] > a' ); + $css->add_property( 'color', $settings['subnavigation_text_current_color'] ); + $css->add_property( 'background-color', $settings['subnavigation_background_current_color'] ); + + $css->set_selector( '.main-navigation .main-nav ul ul li[class*="current-menu-"] > a:hover,.main-navigation .main-nav ul ul li[class*="current-menu-"].sfHover > a' ); + $css->add_property( 'color', $settings['subnavigation_text_current_color'] ); + $css->add_property( 'background-color', $settings['subnavigation_background_current_color'] ); + + $css->set_selector( '.separate-containers .inside-article, .separate-containers .comments-area, .separate-containers .page-header, .one-container .container, .separate-containers .paging-navigation, .inside-page-header' ); + $css->add_property( 'color', $settings['content_text_color'] ); + $css->add_property( 'background-color', $settings['content_background_color'] ); + + $css->set_selector( '.inside-article a,.paging-navigation a,.comments-area a,.page-header a' ); + $css->add_property( 'color', $settings['content_link_color'] ); + + $css->set_selector( '.inside-article a:hover,.paging-navigation a:hover,.comments-area a:hover,.page-header a:hover' ); + $css->add_property( 'color', $settings['content_link_hover_color'] ); + + $css->set_selector( '.entry-header h1,.page-header h1' ); + $css->add_property( 'color', $settings['content_title_color'] ); + + $css->set_selector( '.entry-title a' ); + $css->add_property( 'color', $settings['blog_post_title_color'] ); + + $css->set_selector( '.entry-title a:hover' ); + $css->add_property( 'color', $settings['blog_post_title_hover_color'] ); + + $css->set_selector( '.entry-meta' ); + $css->add_property( 'color', $settings['entry_meta_text_color'] ); + + $css->set_selector( '.entry-meta a' ); + $css->add_property( 'color', $settings['entry_meta_link_color'] ); + + $css->set_selector( '.entry-meta a:hover' ); + $css->add_property( 'color', $settings['entry_meta_link_color_hover'] ); + + $css->set_selector( 'h1' ); + $css->add_property( 'color', $settings['h1_color'] ); + + $css->set_selector( 'h2' ); + $css->add_property( 'color', $settings['h2_color'] ); + + $css->set_selector( 'h3' ); + $css->add_property( 'color', $settings['h3_color'] ); + + $css->set_selector( 'h4' ); + $css->add_property( 'color', $settings['h4_color'] ); + + $css->set_selector( 'h5' ); + $css->add_property( 'color', $settings['h5_color'] ); + + $css->set_selector( 'h6' ); + $css->add_property( 'color', $settings['h6_color'] ); + + $css->set_selector( '.sidebar .widget' ); + $css->add_property( 'color', $settings['sidebar_widget_text_color'] ); + $css->add_property( 'background-color', $settings['sidebar_widget_background_color'] ); + + $css->set_selector( '.sidebar .widget a' ); + $css->add_property( 'color', $settings['sidebar_widget_link_color'] ); + + $css->set_selector( '.sidebar .widget a:hover' ); + $css->add_property( 'color', $settings['sidebar_widget_link_hover_color'] ); + + $css->set_selector( '.sidebar .widget .widget-title' ); + $css->add_property( 'color', $settings['sidebar_widget_title_color'] ); + + $css->set_selector( '.footer-widgets' ); + $css->add_property( 'color', $settings['footer_widget_text_color'] ); + $css->add_property( 'background-color', $settings['footer_widget_background_color'] ); + + $css->set_selector( '.footer-widgets a' ); + $css->add_property( 'color', $settings['footer_widget_link_color'] ); + + $css->set_selector( '.footer-widgets a:hover' ); + $css->add_property( 'color', $settings['footer_widget_link_hover_color'] ); + + $css->set_selector( '.footer-widgets .widget-title' ); + $css->add_property( 'color', $settings['footer_widget_title_color'] ); + + $css->set_selector( '.site-info' ); + $css->add_property( 'color', $settings['footer_text_color'] ); + $css->add_property( 'background-color', $settings['footer_background_color'] ); + + $css->set_selector( '.site-info a' ); + $css->add_property( 'color', $settings['footer_link_color'] ); + + $css->set_selector( '.site-info a:hover' ); + $css->add_property( 'color', $settings['footer_link_hover_color'] ); + + $css->set_selector( '.footer-bar .widget_nav_menu .current-menu-item a' ); + $css->add_property( 'color', $settings['footer_link_hover_color'] ); + + $css->set_selector( 'input[type="text"],input[type="email"],input[type="url"],input[type="password"],input[type="search"],input[type="tel"],input[type="number"],textarea,select' ); + $css->add_property( 'color', $settings['form_text_color'] ); + $css->add_property( 'background-color', $settings['form_background_color'] ); + $css->add_property( 'border-color', $settings['form_border_color'] ); + + $css->set_selector( 'input[type="text"]:focus,input[type="email"]:focus,input[type="url"]:focus,input[type="password"]:focus,input[type="search"]:focus,input[type="tel"]:focus,input[type="number"]:focus,textarea:focus,select:focus' ); + $css->add_property( 'color', $settings['form_text_color_focus'] ); + $css->add_property( 'background-color', $settings['form_background_color_focus'] ); + $css->add_property( 'border-color', $settings['form_border_color_focus'] ); + + $css->set_selector( 'button,html input[type="button"],input[type="reset"],input[type="submit"],a.button,a.wp-block-button__link:not(.has-background)' ); + $css->add_property( 'color', $settings['form_button_text_color'] ); + $css->add_property( 'background-color', $settings['form_button_background_color'] ); + + $css->set_selector( 'button:hover,html input[type="button"]:hover,input[type="reset"]:hover,input[type="submit"]:hover,a.button:hover,button:focus,html input[type="button"]:focus,input[type="reset"]:focus,input[type="submit"]:focus,a.button:focus,a.wp-block-button__link:not(.has-background):active,a.wp-block-button__link:not(.has-background):focus,a.wp-block-button__link:not(.has-background):hover' ); + $css->add_property( 'color', $settings['form_button_text_color_hover'] ); + $css->add_property( 'background-color', $settings['form_button_background_color_hover'] ); + + $css->set_selector( 'a.generate-back-to-top' ); + $css->add_property( 'background-color', $settings['back_to_top_background_color'] ); + $css->add_property( 'color', $settings['back_to_top_text_color'] ); + + $css->set_selector( 'a.generate-back-to-top:hover,a.generate-back-to-top:focus' ); + $css->add_property( 'background-color', $settings['back_to_top_background_color_hover'] ); + $css->add_property( 'color', $settings['back_to_top_text_color_hover'] ); + + $css->start_media_query( generate_get_media_query( 'mobile-menu' ) ); + $css->set_selector( '.main-navigation .menu-bar-item:hover > a, .main-navigation .menu-bar-item.sfHover > a' ); + $css->add_property( 'background', 'none' ); + $css->add_property( 'color', $settings['navigation_text_color'] ); + $css->stop_media_query(); + + do_action( 'generate_colors_css', $css ); + + return apply_filters( 'generate_colors_css_output', $css->css_output() ); + } +} + +if ( ! function_exists( 'generate_font_css' ) ) { + /** + * Generate the CSS in the section using the Theme Customizer. + * + * @since 0.1 + */ + function generate_font_css() { + + $settings = wp_parse_args( + get_option( 'generate_settings', array() ), + generate_get_default_fonts() + ); + + $defaults = generate_get_default_fonts( false ); + + $css = new GeneratePress_CSS(); + + $body_family = generate_get_font_family_css( 'font_body', 'generate_settings', generate_get_default_fonts() ); + $top_bar_family = generate_get_font_family_css( 'font_top_bar', 'generate_settings', generate_get_default_fonts() ); + $site_title_family = generate_get_font_family_css( 'font_site_title', 'generate_settings', generate_get_default_fonts() ); + $site_tagline_family = generate_get_font_family_css( 'font_site_tagline', 'generate_settings', generate_get_default_fonts() ); + $navigation_family = generate_get_font_family_css( 'font_navigation', 'generate_settings', generate_get_default_fonts() ); + $widget_family = generate_get_font_family_css( 'font_widget_title', 'generate_settings', generate_get_default_fonts() ); + $h1_family = generate_get_font_family_css( 'font_heading_1', 'generate_settings', generate_get_default_fonts() ); + $h2_family = generate_get_font_family_css( 'font_heading_2', 'generate_settings', generate_get_default_fonts() ); + $h3_family = generate_get_font_family_css( 'font_heading_3', 'generate_settings', generate_get_default_fonts() ); + $h4_family = generate_get_font_family_css( 'font_heading_4', 'generate_settings', generate_get_default_fonts() ); + $h5_family = generate_get_font_family_css( 'font_heading_5', 'generate_settings', generate_get_default_fonts() ); + $h6_family = generate_get_font_family_css( 'font_heading_6', 'generate_settings', generate_get_default_fonts() ); + $footer_family = generate_get_font_family_css( 'font_footer', 'generate_settings', generate_get_default_fonts() ); + $buttons_family = generate_get_font_family_css( 'font_buttons', 'generate_settings', generate_get_default_fonts() ); + + $css->set_selector( 'body, button, input, select, textarea' ); + $css->add_property( 'font-family', $body_family ); + $css->add_property( 'font-weight', $settings['body_font_weight'], $defaults['body_font_weight'] ); + $css->add_property( 'text-transform', $settings['body_font_transform'], $defaults['body_font_transform'] ); + $css->add_property( 'font-size', $settings['body_font_size'], $defaults['body_font_size'], 'px' ); + + $css->set_selector( 'body' ); + $css->add_property( 'line-height', floatval( $settings['body_line_height'] ), $defaults['body_line_height'] ); + + $css->set_selector( 'p' ); + $css->add_property( 'margin-bottom', floatval( $settings['paragraph_margin'] ), $defaults['paragraph_margin'], 'em' ); + + $css->set_selector( '.entry-content > [class*="wp-block-"]:not(:last-child)' ); + $css->add_property( 'margin-bottom', floatval( $settings['paragraph_margin'] ), false, 'em' ); + + $css->set_selector( '.top-bar' ); + $css->add_property( 'font-family', $defaults['font_top_bar'] !== $settings['font_top_bar'] ? $top_bar_family : null ); + $css->add_property( 'font-weight', $settings['top_bar_font_weight'], $defaults['top_bar_font_weight'] ); + $css->add_property( 'text-transform', $settings['top_bar_font_transform'], $defaults['top_bar_font_transform'] ); + $css->add_property( 'font-size', absint( $settings['top_bar_font_size'] ), absint( $defaults['top_bar_font_size'] ), 'px' ); + + $css->set_selector( '.main-title' ); + $css->add_property( 'font-family', $defaults['font_site_title'] !== $settings['font_site_title'] ? $site_title_family : null ); + $css->add_property( 'font-weight', $settings['site_title_font_weight'], $defaults['site_title_font_weight'] ); + $css->add_property( 'text-transform', $settings['site_title_font_transform'], $defaults['site_title_font_transform'] ); + $css->add_property( 'font-size', absint( $settings['site_title_font_size'] ), $defaults['site_title_font_size'], 'px' ); + + $css->set_selector( '.site-description' ); + $css->add_property( 'font-family', $defaults['font_site_tagline'] !== $settings['font_site_tagline'] ? $site_tagline_family : null ); + $css->add_property( 'font-weight', $settings['site_tagline_font_weight'], $defaults['site_tagline_font_weight'] ); + $css->add_property( 'text-transform', $settings['site_tagline_font_transform'], $defaults['site_tagline_font_transform'] ); + + if ( ! empty( $settings['site_tagline_font_size'] ) ) { + $css->add_property( 'font-size', absint( $settings['site_tagline_font_size'] ), $defaults['site_tagline_font_size'], 'px' ); + } else { + $css->add_property( 'font-size', 'inherit' ); + } + + $css->set_selector( '.main-navigation a, .menu-toggle' ); + $css->add_property( 'font-family', $defaults['font_navigation'] !== $settings['font_navigation'] ? $navigation_family : null ); + $css->add_property( 'font-weight', $settings['navigation_font_weight'], $defaults['navigation_font_weight'] ); + $css->add_property( 'text-transform', $settings['navigation_font_transform'], $defaults['navigation_font_transform'] ); + + if ( ! empty( $settings['navigation_font_size'] ) ) { + $css->add_property( 'font-size', absint( $settings['navigation_font_size'] ), $defaults['navigation_font_size'], 'px' ); + } else { + $css->add_property( 'font-size', 'inherit' ); + } + + if ( generate_is_using_flexbox() ) { + $css->set_selector( '.main-navigation .menu-bar-items' ); + + if ( ! empty( $settings['navigation_font_size'] ) ) { + $css->add_property( 'font-size', absint( $settings['navigation_font_size'] ), $defaults['navigation_font_size'], 'px' ); + } else { + $css->add_property( 'font-size', 'inherit' ); + } + } + + $css->set_selector( '.main-navigation .main-nav ul ul li a' ); + + if ( ! empty( $settings['navigation_font_size'] ) ) { + $subnav_font_size = $settings['navigation_font_size'] >= 17 ? $settings['navigation_font_size'] - 3 : $settings['navigation_font_size'] - 1; + $css->add_property( 'font-size', absint( $subnav_font_size ), false, 'px' ); + } + + $css->set_selector( '.widget-title' ); + $css->add_property( 'font-family', $defaults['font_widget_title'] !== $settings['font_widget_title'] ? $widget_family : null ); + $css->add_property( 'font-weight', $settings['widget_title_font_weight'], $defaults['widget_title_font_weight'] ); + $css->add_property( 'text-transform', $settings['widget_title_font_transform'], $defaults['widget_title_font_transform'] ); + + if ( ! empty( $settings['widget_title_font_size'] ) ) { + $css->add_property( 'font-size', $settings['widget_title_font_size'], $defaults['widget_title_font_size'], 'px' ); + } else { + $css->add_property( 'font-size', 'inherit' ); + } + + $css->add_property( 'margin-bottom', absint( $settings['widget_title_separator'] ), absint( $defaults['widget_title_separator'] ), 'px' ); + + $css->set_selector( '.sidebar .widget, .footer-widgets .widget' ); + + if ( ! empty( $settings['widget_content_font_size'] ) ) { + $css->add_property( 'font-size', absint( $settings['widget_content_font_size'] ), false, 'px' ); + } else { + $css->add_property( 'font-size', 'inherit' ); + } + + $css->set_selector( 'button:not(.menu-toggle),html input[type="button"],input[type="reset"],input[type="submit"],.button,.wp-block-button .wp-block-button__link' ); + $css->add_property( 'font-family', $defaults['font_buttons'] !== $settings['font_buttons'] ? $buttons_family : null ); + $css->add_property( 'font-weight', $settings['buttons_font_weight'], $defaults['buttons_font_weight'] ); + $css->add_property( 'text-transform', $settings['buttons_font_transform'], $defaults['buttons_font_transform'] ); + $css->add_property( 'font-size', absint( $settings['buttons_font_size'] ), $defaults['buttons_font_size'], 'px' ); + + $css->set_selector( 'h1' ); + $css->add_property( 'font-family', $defaults['font_heading_1'] !== $settings['font_heading_1'] ? $h1_family : null ); + $css->add_property( 'font-weight', $settings['heading_1_weight'], $defaults['heading_1_weight'] ); + $css->add_property( 'text-transform', $settings['heading_1_transform'], $defaults['heading_1_transform'] ); + $css->add_property( 'font-size', absint( $settings['heading_1_font_size'] ), $defaults['heading_1_font_size'], 'px' ); + $css->add_property( 'line-height', floatval( $settings['heading_1_line_height'] ), $defaults['heading_1_line_height'], 'em' ); + $css->add_property( 'margin-bottom', floatval( $settings['heading_1_margin_bottom'] ), $defaults['heading_1_margin_bottom'], 'px' ); + + $css->set_selector( 'h2' ); + $css->add_property( 'font-family', $defaults['font_heading_2'] !== $settings['font_heading_2'] ? $h2_family : null ); + $css->add_property( 'font-weight', $settings['heading_2_weight'], $defaults['heading_2_weight'] ); + $css->add_property( 'text-transform', $settings['heading_2_transform'], $defaults['heading_2_transform'] ); + $css->add_property( 'font-size', absint( $settings['heading_2_font_size'] ), $defaults['heading_2_font_size'], 'px' ); + $css->add_property( 'line-height', floatval( $settings['heading_2_line_height'] ), $defaults['heading_2_line_height'], 'em' ); + $css->add_property( 'margin-bottom', floatval( $settings['heading_2_margin_bottom'] ), $defaults['heading_2_margin_bottom'], 'px' ); + + $css->set_selector( 'h3' ); + $css->add_property( 'font-family', $defaults['font_heading_3'] !== $settings['font_heading_3'] ? $h3_family : null ); + $css->add_property( 'font-weight', $settings['heading_3_weight'], $defaults['heading_3_weight'] ); + $css->add_property( 'text-transform', $settings['heading_3_transform'], $defaults['heading_3_transform'] ); + $css->add_property( 'font-size', absint( $settings['heading_3_font_size'] ), $defaults['heading_3_font_size'], 'px' ); + $css->add_property( 'line-height', floatval( $settings['heading_3_line_height'] ), $defaults['heading_3_line_height'], 'em' ); + $css->add_property( 'margin-bottom', floatval( $settings['heading_3_margin_bottom'] ), $defaults['heading_3_margin_bottom'], 'px' ); + + $css->set_selector( 'h4' ); + $css->add_property( 'font-family', $defaults['font_heading_4'] !== $settings['font_heading_4'] ? $h4_family : null ); + $css->add_property( 'font-weight', $settings['heading_4_weight'], $defaults['heading_4_weight'] ); + $css->add_property( 'text-transform', $settings['heading_4_transform'], $defaults['heading_4_transform'] ); + + if ( ! empty( $settings['heading_4_font_size'] ) ) { + $css->add_property( 'font-size', absint( $settings['heading_4_font_size'] ), $defaults['heading_4_font_size'], 'px' ); + } else { + $css->add_property( 'font-size', 'inherit' ); + } + + if ( '' !== $settings['heading_4_line_height'] ) { + $css->add_property( 'line-height', floatval( $settings['heading_4_line_height'] ), $defaults['heading_4_line_height'], 'em' ); + } + + $css->set_selector( 'h5' ); + $css->add_property( 'font-family', $defaults['font_heading_5'] !== $settings['font_heading_5'] ? $h5_family : null ); + $css->add_property( 'font-weight', $settings['heading_5_weight'], $defaults['heading_5_weight'] ); + $css->add_property( 'text-transform', $settings['heading_5_transform'], $defaults['heading_5_transform'] ); + + if ( ! empty( $settings['heading_5_font_size'] ) ) { + $css->add_property( 'font-size', absint( $settings['heading_5_font_size'] ), $defaults['heading_5_font_size'], 'px' ); + } else { + $css->add_property( 'font-size', 'inherit' ); + } + + if ( '' !== $settings['heading_5_line_height'] ) { + $css->add_property( 'line-height', floatval( $settings['heading_5_line_height'] ), $defaults['heading_5_line_height'], 'em' ); + } + + $css->set_selector( 'h6' ); + $css->add_property( 'font-family', $defaults['font_heading_6'] !== $settings['font_heading_6'] ? $h6_family : null ); + $css->add_property( 'font-weight', $settings['heading_6_weight'], $defaults['heading_6_weight'] ); + $css->add_property( 'text-transform', $settings['heading_6_transform'], $defaults['heading_6_transform'] ); + $css->add_property( 'font-size', absint( $settings['heading_6_font_size'] ), $defaults['heading_6_font_size'], 'px' ); + + if ( '' !== $settings['heading_6_line_height'] ) { + $css->add_property( 'line-height', floatval( $settings['heading_6_line_height'] ), $defaults['heading_6_line_height'], 'em' ); + } + + $css->set_selector( '.site-info' ); + $css->add_property( 'font-family', $defaults['font_footer'] !== $settings['font_footer'] ? $footer_family : null ); + $css->add_property( 'font-weight', $settings['footer_weight'], $defaults['footer_weight'] ); + $css->add_property( 'text-transform', $settings['footer_transform'], $defaults['footer_transform'] ); + + if ( ! empty( $settings['footer_font_size'] ) ) { + $css->add_property( 'font-size', absint( $settings['footer_font_size'] ), $defaults['footer_font_size'], 'px' ); + } else { + $css->add_property( 'font-size', 'inherit' ); + } + + $css->start_media_query( generate_get_media_query( 'mobile' ) ); + $css->set_selector( '.main-title' ); + $css->add_property( 'font-size', absint( $settings['mobile_site_title_font_size'] ), false, 'px' ); + + $css->set_selector( 'h1' ); + $css->add_property( 'font-size', absint( $settings['mobile_heading_1_font_size'] ), false, 'px' ); + + $css->set_selector( 'h2' ); + $css->add_property( 'font-size', absint( $settings['mobile_heading_2_font_size'] ), false, 'px' ); + + $css->set_selector( 'h3' ); + $css->add_property( 'font-size', absint( $settings['mobile_heading_3_font_size'] ), false, 'px' ); + + $css->set_selector( 'h4' ); + $css->add_property( 'font-size', absint( $settings['mobile_heading_4_font_size'] ), false, 'px' ); + + $css->set_selector( 'h5' ); + $css->add_property( 'font-size', absint( $settings['mobile_heading_5_font_size'] ), false, 'px' ); + $css->stop_media_query(); + + do_action( 'generate_typography_css', $css ); + + return apply_filters( 'generate_typography_css_output', $css->css_output() ); + } +} + +if ( ! function_exists( 'generate_spacing_css' ) ) { + /** + * Write our dynamic CSS. + * + * @since 0.1 + */ + function generate_spacing_css() { + $settings = wp_parse_args( + get_option( 'generate_spacing_settings', array() ), + generate_spacing_get_defaults() + ); + + $defaults = generate_spacing_get_defaults( false ); + $sidebar_layout = generate_get_layout(); + + $css = new GeneratePress_CSS(); + + $css->set_selector( '.inside-top-bar' ); + $css->add_property( 'padding', generate_padding_css( $settings['top_bar_top'], $settings['top_bar_right'], $settings['top_bar_bottom'], $settings['top_bar_left'] ), generate_padding_css( $defaults['top_bar_top'], $defaults['top_bar_right'], $defaults['top_bar_bottom'], $defaults['top_bar_left'] ) ); + + if ( generate_is_using_flexbox() && 'boxes' === generate_get_option( 'container_alignment' ) ) { + $top_bar_padding = absint( $settings['top_bar_right'] ) + absint( $settings['top_bar_left'] ); + + $css->set_selector( '.inside-top-bar.grid-container' ); + $css->add_property( 'max-width', generate_get_option( 'container_width' ) + $top_bar_padding, false, 'px' ); + } + + $css->set_selector( '.inside-header' ); + $css->add_property( 'padding', generate_padding_css( $settings['header_top'], $settings['header_right'], $settings['header_bottom'], $settings['header_left'] ), generate_padding_css( $defaults['header_top'], $defaults['header_right'], $defaults['header_bottom'], $defaults['header_left'] ) ); + + if ( generate_is_using_flexbox() ) { + if ( 'boxes' === generate_get_option( 'container_alignment' ) ) { + $header_padding = absint( $settings['header_right'] ) + absint( $settings['header_left'] ); + + $css->set_selector( '.inside-header.grid-container' ); + $css->add_property( 'max-width', generate_get_option( 'container_width' ) + $header_padding, false, 'px' ); + } + + if ( 'text' === generate_get_option( 'container_alignment' ) ) { + $navigation_left_padding = absint( $settings['header_left'] ) - absint( $settings['menu_item'] ); + $navigation_right_padding = absint( $settings['header_right'] ) - absint( $settings['menu_item'] ); + + $css->set_selector( '.nav-below-header .main-navigation .inside-navigation.grid-container, .nav-above-header .main-navigation .inside-navigation.grid-container' ); + $css->add_property( 'padding', generate_padding_css( 0, $navigation_right_padding, 0, $navigation_left_padding ) ); + } + } + + $css->set_selector( '.separate-containers .inside-article, .separate-containers .comments-area, .separate-containers .page-header, .separate-containers .paging-navigation, .one-container .site-content, .inside-page-header' ); + $css->add_property( 'padding', generate_padding_css( $settings['content_top'], $settings['content_right'], $settings['content_bottom'], $settings['content_left'] ), generate_padding_css( $defaults['content_top'], $defaults['content_right'], $defaults['content_bottom'], $defaults['content_left'] ) ); + + if ( apply_filters( 'generate_do_group_inner_container_style', true ) ) { + $css->set_selector( '.site-main .wp-block-group__inner-container' ); + $css->add_property( 'padding', generate_padding_css( $settings['content_top'], $settings['content_right'], $settings['content_bottom'], $settings['content_left'] ) ); + } + + if ( generate_is_using_flexbox() ) { + $css->set_selector( '.separate-containers .paging-navigation' ); + $css->add_property( 'padding-top', '20px' ); + $css->add_property( 'padding-bottom', '20px' ); + } + + $content_padding = absint( $settings['content_right'] ) + absint( $settings['content_left'] ); + $css->set_selector( '.entry-content .alignwide, body:not(.no-sidebar) .entry-content .alignfull' ); + $css->add_property( 'margin-left', '-' . absint( $settings['content_left'] ) . 'px' ); + $css->add_property( 'width', 'calc(100% + ' . absint( $content_padding ) . 'px)' ); + $css->add_property( 'max-width', 'calc(100% + ' . absint( $content_padding ) . 'px)' ); + + if ( ! generate_is_using_flexbox() && 'text' === generate_get_option( 'container_alignment' ) ) { + $css->set_selector( '.container.grid-container' ); + $css->add_property( 'max-width', generate_get_option( 'container_width' ) + $content_padding, false, 'px' ); + } + + $css->set_selector( '.one-container.right-sidebar .site-main,.one-container.both-right .site-main' ); + $css->add_property( 'margin-right', absint( $settings['content_right'] ), absint( $defaults['content_right'] ), 'px' ); + + $css->set_selector( '.one-container.left-sidebar .site-main,.one-container.both-left .site-main' ); + $css->add_property( 'margin-left', absint( $settings['content_left'] ), absint( $defaults['content_left'] ), 'px' ); + + $css->set_selector( '.one-container.both-sidebars .site-main' ); + $css->add_property( 'margin', generate_padding_css( '0', $settings['content_right'], '0', $settings['content_left'] ), generate_padding_css( '0', $defaults['content_right'], '0', $defaults['content_left'] ) ); + + if ( generate_is_using_flexbox() ) { + $css->set_selector( '.sidebar .widget, .page-header, .widget-area .main-navigation, .site-main > *' ); + } else { + $css->set_selector( '.separate-containers .widget, .separate-containers .site-main > *, .separate-containers .page-header, .widget-area .main-navigation' ); + } + + $css->add_property( 'margin-bottom', absint( $settings['separator'] ), absint( $defaults['separator'] ), 'px' ); + + $css->set_selector( '.separate-containers .site-main' ); + $css->add_property( 'margin', absint( $settings['separator'] ), $defaults['separator'], 'px' ); + + if ( generate_is_using_flexbox() ) { + $css->set_selector( '.both-right .inside-left-sidebar,.both-left .inside-left-sidebar' ); + $css->add_property( 'margin-right', absint( $settings['separator'] / 2 ), absint( $defaults['separator'] / 2 ), 'px' ); + + $css->set_selector( '.both-right .inside-right-sidebar,.both-left .inside-right-sidebar' ); + $css->add_property( 'margin-left', absint( $settings['separator'] / 2 ), absint( $defaults['separator'] / 2 ), 'px' ); + + $css->set_selector( '.one-container.archive .post:not(:last-child), .one-container.blog .post:not(:last-child)' ); + $css->add_property( 'padding-bottom', absint( $settings['content_bottom'] ), absint( $defaults['content_bottom'] ), 'px' ); + } else { + $css->set_selector( '.both-right.separate-containers .inside-left-sidebar' ); + $css->add_property( 'margin-right', absint( $settings['separator'] / 2 ), absint( $defaults['separator'] / 2 ), 'px' ); + + $css->set_selector( '.both-right.separate-containers .inside-right-sidebar' ); + $css->add_property( 'margin-left', absint( $settings['separator'] / 2 ), absint( $defaults['separator'] / 2 ), 'px' ); + + $css->set_selector( '.both-left.separate-containers .inside-left-sidebar' ); + $css->add_property( 'margin-right', absint( $settings['separator'] / 2 ), absint( $defaults['separator'] / 2 ), 'px' ); + + $css->set_selector( '.both-left.separate-containers .inside-right-sidebar' ); + $css->add_property( 'margin-left', absint( $settings['separator'] / 2 ), absint( $defaults['separator'] / 2 ), 'px' ); + } + + if ( generate_is_using_flexbox() ) { + $css->set_selector( '.separate-containers .featured-image' ); + } else { + $css->set_selector( '.separate-containers .page-header-image, .separate-containers .page-header-contained, .separate-containers .page-header-image-single, .separate-containers .page-header-content-single' ); + } + + $css->add_property( 'margin-top', absint( $settings['separator'] ), absint( $defaults['separator'] ), 'px' ); + + $css->set_selector( '.separate-containers .inside-right-sidebar, .separate-containers .inside-left-sidebar' ); + $css->add_property( 'margin-top', absint( $settings['separator'] ), absint( $defaults['separator'] ), 'px' ); + $css->add_property( 'margin-bottom', absint( $settings['separator'] ), absint( $defaults['separator'] ), 'px' ); + + if ( generate_is_using_flexbox() ) { + $css->set_selector( '.main-navigation .main-nav ul li a,.menu-toggle,.main-navigation .menu-bar-item > a' ); + } else { + $css->set_selector( '.main-navigation .main-nav ul li a,.menu-toggle,.main-navigation .mobile-bar-items a' ); + } + + $css->add_property( 'padding-left', absint( $settings['menu_item'] ), absint( $defaults['menu_item'] ), 'px' ); + $css->add_property( 'padding-right', absint( $settings['menu_item'] ), absint( $defaults['menu_item'] ), 'px' ); + $css->add_property( 'line-height', absint( $settings['menu_item_height'] ), absint( $defaults['menu_item_height'] ), 'px' ); + + $css->set_selector( '.main-navigation .main-nav ul ul li a' ); + $css->add_property( 'padding', generate_padding_css( $settings['sub_menu_item_height'], $settings['menu_item'], $settings['sub_menu_item_height'], $settings['menu_item'] ), generate_padding_css( $defaults['sub_menu_item_height'], $defaults['menu_item'], $defaults['sub_menu_item_height'], $defaults['menu_item'] ) ); + + $css->set_selector( '.main-navigation ul ul' ); + $css->add_property( 'width', absint( $settings['sub_menu_width'] ), absint( $defaults['sub_menu_width'] ), 'px' ); + + $css->set_selector( '.navigation-search input[type="search"]' ); + $css->add_property( 'height', absint( $settings['menu_item_height'] ), absint( $defaults['menu_item_height'] ), 'px' ); + + $css->set_selector( '.rtl .menu-item-has-children .dropdown-menu-toggle' ); + $css->add_property( 'padding-left', absint( $settings['menu_item'] ), false, 'px' ); + + $css->set_selector( '.menu-item-has-children .dropdown-menu-toggle' ); + $css->add_property( 'padding-right', absint( $settings['menu_item'] ), absint( $defaults['menu_item'] ), 'px' ); + + $css->set_selector( '.menu-item-has-children ul .dropdown-menu-toggle' ); + $css->add_property( 'padding-top', absint( $settings['sub_menu_item_height'] ), absint( $defaults['sub_menu_item_height'] ), 'px' ); + $css->add_property( 'padding-bottom', absint( $settings['sub_menu_item_height'] ), absint( $defaults['sub_menu_item_height'] ), 'px' ); + $css->add_property( 'margin-top', '-' . absint( $settings['sub_menu_item_height'] ), '-' . absint( $defaults['sub_menu_item_height'] ), 'px' ); + + $css->set_selector( '.rtl .main-navigation .main-nav ul li.menu-item-has-children > a' ); + $css->add_property( 'padding-right', absint( $settings['menu_item'] ), false, 'px' ); + + $css->set_selector( '.widget-area .widget' ); + $css->add_property( 'padding', generate_padding_css( $settings['widget_top'], $settings['widget_right'], $settings['widget_bottom'], $settings['widget_left'] ), generate_padding_css( $defaults['widget_top'], $defaults['widget_right'], $defaults['widget_bottom'], $defaults['widget_left'] ) ); + + if ( generate_is_using_flexbox() ) { + $css->set_selector( '.footer-widgets-container' ); + $css->add_property( 'padding', generate_padding_css( $settings['footer_widget_container_top'], $settings['footer_widget_container_right'], $settings['footer_widget_container_bottom'], $settings['footer_widget_container_left'] ), generate_padding_css( $defaults['footer_widget_container_top'], $defaults['footer_widget_container_right'], $defaults['footer_widget_container_bottom'], $defaults['footer_widget_container_left'] ) ); + + if ( 'boxes' === generate_get_option( 'container_alignment' ) ) { + $footer_widgets_padding = absint( $settings['footer_widget_container_right'] ) + absint( $settings['footer_widget_container_left'] ); + + $css->set_selector( '.footer-widgets-container.grid-container' ); + $css->add_property( 'max-width', generate_get_option( 'container_width' ) + $footer_widgets_padding, false, 'px' ); + } + } else { + $css->set_selector( '.footer-widgets' ); + $css->add_property( 'padding', generate_padding_css( $settings['footer_widget_container_top'], $settings['footer_widget_container_right'], $settings['footer_widget_container_bottom'], $settings['footer_widget_container_left'] ), generate_padding_css( $defaults['footer_widget_container_top'], $defaults['footer_widget_container_right'], $defaults['footer_widget_container_bottom'], $defaults['footer_widget_container_left'] ) ); + } + + $css->set_selector( '.site-footer .footer-widgets-container .inner-padding' ); + $css->add_property( 'padding', generate_padding_css( '0', '0', '0', $settings['footer_widget_separator'] ), generate_padding_css( '0', '0', '0', $defaults['footer_widget_separator'] ) ); + + $css->set_selector( '.site-footer .footer-widgets-container .inside-footer-widgets' ); + $css->add_property( 'margin-left', '-' . absint( $settings['footer_widget_separator'] ), '-' . absint( $defaults['footer_widget_separator'] ), 'px' ); + + if ( generate_is_using_flexbox() ) { + $css->set_selector( '.inside-site-info' ); + $css->add_property( 'padding', generate_padding_css( $settings['footer_top'], $settings['footer_right'], $settings['footer_bottom'], $settings['footer_left'] ), generate_padding_css( $defaults['footer_top'], $defaults['footer_right'], $defaults['footer_bottom'], $defaults['footer_left'] ) ); + + if ( 'boxes' === generate_get_option( 'container_alignment' ) ) { + $site_info_padding = absint( $settings['footer_right'] ) + absint( $settings['footer_left'] ); + + $css->set_selector( '.inside-site-info.grid-container' ); + $css->add_property( 'max-width', generate_get_option( 'container_width' ) + $site_info_padding, false, 'px' ); + } + } else { + $css->set_selector( '.site-info' ); + $css->add_property( 'padding', generate_padding_css( $settings['footer_top'], $settings['footer_right'], $settings['footer_bottom'], $settings['footer_left'] ), generate_padding_css( $defaults['footer_top'], $defaults['footer_right'], $defaults['footer_bottom'], $defaults['footer_left'] ) ); + } + + $css->start_media_query( generate_get_media_query( 'mobile' ) ); + $css->set_selector( '.separate-containers .inside-article, .separate-containers .comments-area, .separate-containers .page-header, .separate-containers .paging-navigation, .one-container .site-content, .inside-page-header' ); + $css->add_property( 'padding', generate_padding_css( $settings['mobile_content_top'], $settings['mobile_content_right'], $settings['mobile_content_bottom'], $settings['mobile_content_left'] ) ); + + if ( apply_filters( 'generate_do_group_inner_container_style', true ) ) { + $css->set_selector( '.site-main .wp-block-group__inner-container' ); + $css->add_property( 'padding', generate_padding_css( $settings['mobile_content_top'], $settings['mobile_content_right'], $settings['mobile_content_bottom'], $settings['mobile_content_left'] ) ); + } + + $css->set_selector( '.inside-top-bar' ); + + if ( '' !== $settings['mobile_top_bar_top'] ) { + $css->add_property( 'padding-top', absint( $settings['mobile_top_bar_top'] ), false, 'px' ); + } + + if ( '' !== $settings['mobile_top_bar_right'] ) { + $css->add_property( 'padding-right', absint( $settings['mobile_top_bar_right'] ), false, 'px' ); + } + + if ( '' !== $settings['mobile_top_bar_bottom'] ) { + $css->add_property( 'padding-bottom', absint( $settings['mobile_top_bar_bottom'] ), false, 'px' ); + } + + if ( '' !== $settings['mobile_top_bar_left'] ) { + $css->add_property( 'padding-left', absint( $settings['mobile_top_bar_left'] ), false, 'px' ); + } + + $css->set_selector( '.inside-header' ); + + if ( '' !== $settings['mobile_header_top'] ) { + $css->add_property( 'padding-top', absint( $settings['mobile_header_top'] ), false, 'px' ); + } + + if ( '' !== $settings['mobile_header_right'] ) { + $css->add_property( 'padding-right', absint( $settings['mobile_header_right'] ), false, 'px' ); + } + + if ( '' !== $settings['mobile_header_bottom'] ) { + $css->add_property( 'padding-bottom', absint( $settings['mobile_header_bottom'] ), false, 'px' ); + } + + if ( '' !== $settings['mobile_header_left'] ) { + $css->add_property( 'padding-left', absint( $settings['mobile_header_left'] ), false, 'px' ); + } + + $css->set_selector( '.widget-area .widget' ); + if ( '' !== $settings['mobile_widget_top'] ) { + $css->add_property( 'padding-top', absint( $settings['mobile_widget_top'] ), false, 'px' ); + } + + if ( '' !== $settings['mobile_widget_right'] ) { + $css->add_property( 'padding-right', absint( $settings['mobile_widget_right'] ), false, 'px' ); + } + + if ( '' !== $settings['mobile_widget_bottom'] ) { + $css->add_property( 'padding-bottom', absint( $settings['mobile_widget_bottom'] ), false, 'px' ); + } + + if ( '' !== $settings['mobile_widget_left'] ) { + $css->add_property( 'padding-left', absint( $settings['mobile_widget_left'] ), false, 'px' ); + } + + if ( generate_is_using_flexbox() ) { + $css->set_selector( '.footer-widgets-container' ); + } else { + $css->set_selector( '.footer-widgets' ); + } + + if ( '' !== $settings['mobile_footer_widget_container_top'] ) { + $css->add_property( 'padding-top', absint( $settings['mobile_footer_widget_container_top'] ), false, 'px' ); + } + + if ( '' !== $settings['mobile_footer_widget_container_right'] ) { + $css->add_property( 'padding-right', absint( $settings['mobile_footer_widget_container_right'] ), false, 'px' ); + } + + if ( '' !== $settings['mobile_footer_widget_container_bottom'] ) { + $css->add_property( 'padding-bottom', absint( $settings['mobile_footer_widget_container_bottom'] ), false, 'px' ); + } + + if ( '' !== $settings['mobile_footer_widget_container_left'] ) { + $css->add_property( 'padding-left', absint( $settings['mobile_footer_widget_container_left'] ), false, 'px' ); + } + + if ( generate_is_using_flexbox() ) { + $css->set_selector( '.inside-site-info' ); + } else { + $css->set_selector( '.site-info' ); + } + + if ( '' !== $settings['mobile_footer_top'] ) { + $css->add_property( 'padding-top', absint( $settings['mobile_footer_top'] ), false, 'px' ); + } + + if ( '' !== $settings['mobile_footer_right'] ) { + $css->add_property( 'padding-right', absint( $settings['mobile_footer_right'] ), false, 'px' ); + } + + if ( '' !== $settings['mobile_footer_bottom'] ) { + $css->add_property( 'padding-bottom', absint( $settings['mobile_footer_bottom'] ), false, 'px' ); + } + + if ( '' !== $settings['mobile_footer_left'] ) { + $css->add_property( 'padding-left', absint( $settings['mobile_footer_left'] ), false, 'px' ); + } + + $mobile_content_padding = absint( $settings['mobile_content_right'] ) + absint( $settings['mobile_content_left'] ); + $css->set_selector( '.entry-content .alignwide, body:not(.no-sidebar) .entry-content .alignfull' ); + $css->add_property( 'margin-left', '-' . absint( $settings['mobile_content_left'] ) . 'px' ); + $css->add_property( 'width', 'calc(100% + ' . absint( $mobile_content_padding ) . 'px)' ); + $css->add_property( 'max-width', 'calc(100% + ' . absint( $mobile_content_padding ) . 'px)' ); + + if ( '' !== $settings['mobile_separator'] ) { + if ( generate_is_using_flexbox() ) { + $css->set_selector( '.sidebar .widget, .page-header, .widget-area .main-navigation, .site-main > *' ); + } else { + $css->set_selector( '.separate-containers .widget, .separate-containers .site-main > *, .separate-containers .page-header' ); + } + + $css->add_property( 'margin-bottom', absint( $settings['mobile_separator'] ), false, 'px' ); + + $css->set_selector( '.separate-containers .site-main' ); + $css->add_property( 'margin', absint( $settings['mobile_separator'] ), false, 'px' ); + + if ( generate_is_using_flexbox() ) { + $css->set_selector( '.separate-containers .featured-image' ); + } else { + $css->set_selector( '.separate-containers .page-header-image, .separate-containers .page-header-image-single' ); + } + + $css->add_property( 'margin-top', absint( $settings['mobile_separator'] ), false, 'px' ); + + $css->set_selector( '.separate-containers .inside-right-sidebar, .separate-containers .inside-left-sidebar' ); + $css->add_property( 'margin-top', absint( $settings['mobile_separator'] ), false, 'px' ); + $css->add_property( 'margin-bottom', absint( $settings['mobile_separator'] ), false, 'px' ); + + if ( generate_is_using_flexbox() ) { + $css->set_selector( '.one-container .site-main .paging-navigation' ); + $css->add_property( 'margin-bottom', absint( $settings['mobile_separator'] ), false, 'px' ); + } + } else { + if ( generate_is_using_flexbox() ) { + $css->set_selector( '.one-container .site-main .paging-navigation' ); + $css->add_property( 'margin-bottom', absint( $settings['separator'] ), false, 'px' ); + } + } + $css->stop_media_query(); + + // Add spacing back where dropdown arrow should be. + // Old versions of WP don't get nice things. + if ( version_compare( $GLOBALS['wp_version'], '4.4', '<' ) ) { + $css->set_selector( '.main-navigation .main-nav ul li.menu-item-has-children>a, .secondary-navigation .main-nav ul li.menu-item-has-children>a' ); + $css->add_property( 'padding-right', absint( $settings['menu_item'] ), absint( $defaults['menu_item'] ), 'px' ); + } + + $output = ''; + + if ( ! generate_is_using_flexbox() ) { + $generate_settings = wp_parse_args( + get_option( 'generate_settings', array() ), + generate_get_color_defaults() + ); + + // Find out if the content background color and sidebar widget background color is the same. + $sidebar = strtoupper( $generate_settings['sidebar_widget_background_color'] ); + $content = strtoupper( $generate_settings['content_background_color'] ); + + // phpcs:ignore WordPress.PHP.StrictComparisons.LooseComparison + $colors_match = ( ( $sidebar == $content ) || '' == $sidebar ) ? true : false; + + // If they're all 40 (default), remove the padding when one container is set. + // This way, the user can still adjust the padding and it will work (unless they want 40px padding). + // We'll also remove the padding if there's no color difference between the widgets and content background color. + // phpcs:ignore WordPress.PHP.StrictComparisons.LooseComparison + if ( ( '40' == $settings['widget_top'] && '40' == $settings['widget_right'] && '40' == $settings['widget_bottom'] && '40' == $settings['widget_left'] ) && $colors_match ) { + $output .= '.one-container .sidebar .widget{padding:0px;}'; + } + } + + do_action( 'generate_spacing_css', $css ); + + return apply_filters( 'generate_spacing_css_output', $css->css_output() . $output ); + } +} + +/** + * Generates any CSS that can't be cached (can change from page to page). + * + * @since 2.0 + */ +function generate_no_cache_dynamic_css() { + $css = new GeneratePress_CSS(); + + if ( generate_is_using_flexbox() ) { + $right_sidebar_width = apply_filters( 'generate_right_sidebar_width', '30' ); + $left_sidebar_width = apply_filters( 'generate_left_sidebar_width', '30' ); + + $css->set_selector( '.is-right-sidebar' ); + $css->add_property( 'width', absint( $right_sidebar_width ) . '%' ); + + $css->set_selector( '.is-left-sidebar' ); + $css->add_property( 'width', absint( $left_sidebar_width ) . '%' ); + + $content_width = 100; + $sidebar_layout = generate_get_layout(); + + switch ( $sidebar_layout ) { + case 'right-sidebar': + $content_width = $content_width - absint( $right_sidebar_width ); + break; + + case 'left-sidebar': + $content_width = $content_width - absint( $left_sidebar_width ); + break; + + case 'both-sidebars': + case 'both-right': + case 'both-left': + $content_width = $content_width - absint( $right_sidebar_width ) - absint( $left_sidebar_width ); + break; + } + + $css->set_selector( '.site-content .content-area' ); + $css->add_property( 'width', absint( $content_width ) . '%' ); + } + + $css->start_media_query( generate_get_media_query( 'mobile-menu' ) ); + + if ( generate_is_using_flexbox() ) { + $css->set_selector( '.main-navigation .menu-toggle,.sidebar-nav-mobile:not(#sticky-placeholder)' ); + $css->add_property( 'display', 'block' ); + + $css->set_selector( '.main-navigation ul,.gen-sidebar-nav,.main-navigation:not(.slideout-navigation):not(.toggled) .main-nav > ul,.has-inline-mobile-toggle #site-navigation .inside-navigation > *:not(.navigation-search):not(.main-nav)' ); + $css->add_property( 'display', 'none' ); + + $css->set_selector( '.nav-align-right .inside-navigation,.nav-align-center .inside-navigation' ); + $css->add_property( 'justify-content', 'space-between' ); + + if ( is_rtl() ) { + $css->set_selector( '.rtl .nav-align-right .inside-navigation,.rtl .nav-align-center .inside-navigation, .rtl .nav-align-left .inside-navigation' ); + $css->add_property( 'justify-content', 'space-between' ); + } + + if ( generate_has_inline_mobile_toggle() ) { + $css->set_selector( '.has-inline-mobile-toggle .mobile-menu-control-wrapper' ); + $css->add_property( 'display', 'flex' ); + $css->add_property( 'flex-wrap', 'wrap' ); + + $css->set_selector( '.has-inline-mobile-toggle .inside-header' ); + $css->add_property( 'flex-direction', 'row' ); + $css->add_property( 'text-align', 'left' ); + $css->add_property( 'flex-wrap', 'wrap' ); + + $css->set_selector( '.has-inline-mobile-toggle .header-widget,.has-inline-mobile-toggle #site-navigation' ); + $css->add_property( 'flex-basis', '100%' ); + + $css->set_selector( '.nav-float-left .has-inline-mobile-toggle #site-navigation' ); + $css->add_property( 'order', '10' ); + } + } else { + $css->set_selector( '.main-navigation .menu-toggle,.main-navigation .mobile-bar-items,.sidebar-nav-mobile:not(#sticky-placeholder)' ); + $css->add_property( 'display', 'block' ); + + $css->set_selector( '.main-navigation ul,.gen-sidebar-nav' ); + $css->add_property( 'display', 'none' ); + + $css->set_selector( '[class*="nav-float-"] .site-header .inside-header > *' ); + $css->add_property( 'float', 'none' ); + $css->add_property( 'clear', 'both' ); + } + + $css->stop_media_query(); + + return $css->css_output(); +} + +/** + * Get all of our dynamic CSS to be cached/added to a file. + * + * @since 3.0.0 + */ +function generate_get_dynamic_css() { + $css = generate_base_css() . generate_font_css() . generate_advanced_css() . generate_spacing_css(); + + return apply_filters( 'generate_dynamic_css', $css ); +} + +add_action( 'wp_enqueue_scripts', 'generate_enqueue_dynamic_css', 50 ); +/** + * Enqueue our dynamic CSS. + * + * @since 2.0 + */ +function generate_enqueue_dynamic_css() { + if ( apply_filters( 'generate_using_dynamic_css_external_file', false ) ) { + $css = ''; + } elseif ( ! get_option( 'generate_dynamic_css_output', false ) || is_customize_preview() || apply_filters( 'generate_dynamic_css_skip_cache', false ) ) { + $css = generate_get_dynamic_css(); + } else { + $css = get_option( 'generate_dynamic_css_output' ) . '/* End cached CSS */'; + } + + $css = $css . generate_no_cache_dynamic_css(); + + wp_add_inline_style( 'generate-style', wp_strip_all_tags( $css ) ); +} + +add_action( 'init', 'generate_set_dynamic_css_cache' ); +/** + * Sets our dynamic CSS cache if it doesn't exist. + * + * If the theme version changed, bust the cache. + * + * @since 2.0 + */ +function generate_set_dynamic_css_cache() { + if ( apply_filters( 'generate_dynamic_css_skip_cache', false ) ) { + return; + } + + $cached_css = get_option( 'generate_dynamic_css_output', false ); + $cached_version = get_option( 'generate_dynamic_css_cached_version', '' ); + + if ( ! $cached_css || GENERATE_VERSION !== $cached_version ) { + $css = generate_base_css() . generate_font_css() . generate_advanced_css() . generate_spacing_css(); + + update_option( 'generate_dynamic_css_output', wp_strip_all_tags( $css ) ); + update_option( 'generate_dynamic_css_cached_version', esc_html( GENERATE_VERSION ) ); + } +} + +add_action( 'customize_save_after', 'generate_update_dynamic_css_cache' ); +/** + * Update our CSS cache when done saving Customizer options. + * + * @since 2.0 + */ +function generate_update_dynamic_css_cache() { + if ( apply_filters( 'generate_dynamic_css_skip_cache', false ) ) { + return; + } + + $css = generate_base_css() . generate_font_css() . generate_advanced_css() . generate_spacing_css(); + update_option( 'generate_dynamic_css_output', wp_strip_all_tags( $css ) ); +} diff --git a/wp-content/themes/generatepress/inc/customizer.php b/wp-content/themes/generatepress/inc/customizer.php index 595c10eb..578c9843 100644 --- a/wp-content/themes/generatepress/inc/customizer.php +++ b/wp-content/themes/generatepress/inc/customizer.php @@ -1,1560 +1,1560 @@ -get_control( 'blogdescription' ) ) { - $wp_customize->get_control( 'blogdescription' )->priority = 3; - $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; - } - - if ( $wp_customize->get_control( 'blogname' ) ) { - $wp_customize->get_control( 'blogname' )->priority = 1; - $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; - } - - if ( $wp_customize->get_control( 'custom_logo' ) ) { - $wp_customize->get_setting( 'custom_logo' )->transport = 'refresh'; - } - - if ( method_exists( $wp_customize, 'register_control_type' ) ) { - $wp_customize->register_control_type( 'Generate_Customize_Misc_Control' ); - $wp_customize->register_control_type( 'Generate_Range_Slider_Control' ); - } - - if ( method_exists( $wp_customize, 'register_section_type' ) ) { - $wp_customize->register_section_type( 'GeneratePress_Upsell_Section' ); - } - - if ( isset( $wp_customize->selective_refresh ) ) { - $wp_customize->selective_refresh->add_partial( - 'blogname', - array( - 'selector' => '.main-title a', - 'render_callback' => 'generate_customize_partial_blogname', - ) - ); - - $wp_customize->selective_refresh->add_partial( - 'blogdescription', - array( - 'selector' => '.site-description', - 'render_callback' => 'generate_customize_partial_blogdescription', - ) - ); - } - - if ( ! defined( 'GP_PREMIUM_VERSION' ) ) { - $wp_customize->add_section( - new GeneratePress_Upsell_Section( - $wp_customize, - 'generatepress_upsell_section', - array( - 'pro_text' => __( 'Premium Modules Available', 'generatepress' ), - 'pro_url' => generate_get_premium_url( 'https://generatepress.com/premium' ), - 'capability' => 'edit_theme_options', - 'priority' => 0, - 'type' => 'gp-upsell-section', - ) - ) - ); - } - - $wp_customize->add_setting( - 'generate_settings[hide_title]', - array( - 'default' => $defaults['hide_title'], - 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_checkbox', - ) - ); - - $wp_customize->add_control( - 'generate_settings[hide_title]', - array( - 'type' => 'checkbox', - 'label' => __( 'Hide site title', 'generatepress' ), - 'section' => 'title_tagline', - 'priority' => 2, - ) - ); - - $wp_customize->add_setting( - 'generate_settings[hide_tagline]', - array( - 'default' => $defaults['hide_tagline'], - 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_checkbox', - ) - ); - - $wp_customize->add_control( - 'generate_settings[hide_tagline]', - array( - 'type' => 'checkbox', - 'label' => __( 'Hide site tagline', 'generatepress' ), - 'section' => 'title_tagline', - 'priority' => 4, - ) - ); - - if ( ! function_exists( 'the_custom_logo' ) ) { - $wp_customize->add_setting( - 'generate_settings[logo]', - array( - 'default' => $defaults['logo'], - 'type' => 'option', - 'sanitize_callback' => 'esc_url_raw', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Image_Control( - $wp_customize, - 'generate_settings[logo]', - array( - 'label' => __( 'Logo', 'generatepress' ), - 'section' => 'title_tagline', - 'settings' => 'generate_settings[logo]', - ) - ) - ); - } - - $wp_customize->add_setting( - 'generate_settings[retina_logo]', - array( - 'default' => $defaults['retina_logo'], - 'type' => 'option', - 'sanitize_callback' => 'esc_url_raw', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Image_Control( - $wp_customize, - 'generate_settings[retina_logo]', - array( - 'label' => __( 'Retina Logo', 'generatepress' ), - 'section' => 'title_tagline', - 'settings' => 'generate_settings[retina_logo]', - 'active_callback' => 'generate_has_custom_logo_callback', - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[logo_width]', - array( - 'default' => $defaults['logo_width'], - 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_empty_absint', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new Generate_Range_Slider_Control( - $wp_customize, - 'generate_settings[logo_width]', - array( - 'label' => __( 'Logo Width', 'generatepress' ), - 'section' => 'title_tagline', - 'settings' => array( - 'desktop' => 'generate_settings[logo_width]', - ), - 'choices' => array( - 'desktop' => array( - 'min' => 20, - 'max' => 1200, - 'step' => 10, - 'edit' => true, - 'unit' => 'px', - ), - ), - 'active_callback' => 'generate_has_custom_logo_callback', - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[inline_logo_site_branding]', - array( - 'default' => $defaults['inline_logo_site_branding'], - 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_checkbox', - ) - ); - - $wp_customize->add_control( - 'generate_settings[inline_logo_site_branding]', - array( - 'type' => 'checkbox', - 'label' => esc_html__( 'Place logo next to title', 'generatepress' ), - 'section' => 'title_tagline', - 'active_callback' => 'generate_show_inline_logo_callback', - ) - ); - - $wp_customize->add_section( - 'body_section', - array( - 'title' => $wp_customize->get_panel( 'generate_colors_panel' ) ? __( 'Body', 'generatepress' ) : __( 'Colors', 'generatepress' ), - 'capability' => 'edit_theme_options', - 'priority' => 30, - 'panel' => $wp_customize->get_panel( 'generate_colors_panel' ) ? 'generate_colors_panel' : false, - ) - ); - - $wp_customize->add_setting( - 'generate_settings[background_color]', - array( - 'default' => $defaults['background_color'], - 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_hex_color', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Color_Control( - $wp_customize, - 'generate_settings[background_color]', - array( - 'label' => __( 'Background Color', 'generatepress' ), - 'section' => 'body_section', - 'settings' => 'generate_settings[background_color]', - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[text_color]', - array( - 'default' => $defaults['text_color'], - 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_hex_color', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Color_Control( - $wp_customize, - 'generate_settings[text_color]', - array( - 'label' => __( 'Text Color', 'generatepress' ), - 'section' => 'body_section', - 'settings' => 'generate_settings[text_color]', - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[link_color]', - array( - 'default' => $defaults['link_color'], - 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_hex_color', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Color_Control( - $wp_customize, - 'generate_settings[link_color]', - array( - 'label' => __( 'Link Color', 'generatepress' ), - 'section' => 'body_section', - 'settings' => 'generate_settings[link_color]', - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[link_color_hover]', - array( - 'default' => $defaults['link_color_hover'], - 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_hex_color', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Color_Control( - $wp_customize, - 'generate_settings[link_color_hover]', - array( - 'label' => __( 'Link Color Hover', 'generatepress' ), - 'section' => 'body_section', - 'settings' => 'generate_settings[link_color_hover]', - ) - ) - ); - - if ( '' !== generate_get_option( 'link_color_visited' ) ) { - $wp_customize->add_setting( - 'generate_settings[link_color_visited]', - array( - 'default' => $defaults['link_color_visited'], - 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_hex_color', - 'transport' => 'refresh', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Color_Control( - $wp_customize, - 'generate_settings[link_color_visited]', - array( - 'label' => __( 'Link Color Visited', 'generatepress' ), - 'section' => 'body_section', - 'settings' => 'generate_settings[link_color_visited]', - ) - ) - ); - } - - $color_defaults = generate_get_color_defaults(); - - if ( ! $wp_customize->get_setting( 'generate_settings[blog_post_title_color]' ) ) { - $wp_customize->add_setting( - 'generate_settings[blog_post_title_color]', - array( - 'default' => $color_defaults['blog_post_title_color'], - 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_hex_color', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Color_Control( - $wp_customize, - 'blog_post_title_color', - array( - 'label' => __( 'Blog Post Title', 'generatepress' ), - 'section' => $wp_customize->get_section( 'content_color_section' ) ? 'content_color_section' : 'body_section', - 'settings' => 'generate_settings[blog_post_title_color]', - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[blog_post_title_hover_color]', - array( - 'default' => $color_defaults['blog_post_title_hover_color'], - 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_hex_color', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new WP_Customize_Color_Control( - $wp_customize, - 'blog_post_title_hover_color', - array( - 'label' => __( 'Blog Post Title Hover', 'generatepress' ), - 'section' => $wp_customize->get_section( 'content_color_section' ) ? 'content_color_section' : 'body_section', - 'settings' => 'generate_settings[blog_post_title_hover_color]', - ) - ) - ); - } - - $wp_customize->add_setting( - 'nav_color_presets', - array( - 'default' => 'current', - 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_preset_layout', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - 'nav_color_presets', - array( - 'type' => 'select', - 'label' => __( 'Navigation Color Presets', 'generatepress' ), - 'section' => $wp_customize->get_section( 'navigation_color_section' ) ? 'navigation_color_section' : 'body_section', - 'priority' => $wp_customize->get_section( 'navigation_color_section' ) ? 0 : null, - 'choices' => array( - 'current' => __( 'Current', 'generatepress' ), - 'default' => __( 'Default', 'generatepress' ), - 'classic' => __( 'Classic', 'generatepress' ), - 'grey' => __( 'Grey', 'generatepress' ), - 'red' => __( 'Red', 'generatepress' ), - 'green' => __( 'Green', 'generatepress' ), - 'blue' => __( 'Blue', 'generatepress' ), - ), - 'settings' => 'nav_color_presets', - ) - ); - - if ( ! $wp_customize->get_setting( 'generate_settings[navigation_background_color]' ) ) { - $wp_customize->add_setting( - 'generate_settings[navigation_background_color]', - array( - 'default' => $color_defaults['navigation_background_color'], - 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_rgba_color', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[navigation_text_color]', - array( - 'default' => $color_defaults['navigation_text_color'], - 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_hex_color', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[navigation_background_hover_color]', - array( - 'default' => $color_defaults['navigation_background_hover_color'], - 'type' => 'option', - 'transport' => 'postMessage', - 'sanitize_callback' => 'generate_sanitize_rgba_color', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[navigation_text_hover_color]', - array( - 'default' => $color_defaults['navigation_text_hover_color'], - 'type' => 'option', - 'transport' => 'postMessage', - 'sanitize_callback' => 'generate_sanitize_hex_color', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[navigation_background_current_color]', - array( - 'default' => $color_defaults['navigation_background_current_color'], - 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_rgba_color', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[navigation_text_current_color]', - array( - 'default' => $color_defaults['navigation_text_current_color'], - 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_hex_color', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[subnavigation_background_color]', - array( - 'default' => $color_defaults['subnavigation_background_color'], - 'type' => 'option', - 'transport' => 'postMessage', - 'sanitize_callback' => 'generate_sanitize_rgba_color', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[subnavigation_text_color]', - array( - 'default' => $color_defaults['subnavigation_text_color'], - 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_hex_color', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[subnavigation_background_hover_color]', - array( - 'default' => $color_defaults['subnavigation_background_hover_color'], - 'type' => 'option', - 'transport' => 'postMessage', - 'sanitize_callback' => 'generate_sanitize_rgba_color', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[subnavigation_text_hover_color]', - array( - 'default' => $color_defaults['subnavigation_text_hover_color'], - 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_hex_color', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[subnavigation_background_current_color]', - array( - 'default' => $color_defaults['subnavigation_background_current_color'], - 'type' => 'option', - 'transport' => 'postMessage', - 'sanitize_callback' => 'generate_sanitize_rgba_color', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[subnavigation_text_current_color]', - array( - 'default' => $color_defaults['subnavigation_text_current_color'], - 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_hex_color', - 'transport' => 'postMessage', - ) - ); - } - - if ( ! function_exists( 'generate_colors_customize_register' ) && ! defined( 'GP_PREMIUM_VERSION' ) ) { - $wp_customize->add_control( - new Generate_Customize_Misc_Control( - $wp_customize, - 'colors_get_addon_desc', - array( - 'section' => 'body_section', - 'type' => 'addon', - 'label' => __( 'Learn More', 'generatepress' ), - 'description' => __( 'More options are available for this section in our premium version.', 'generatepress' ), - 'url' => generate_get_premium_url( 'https://generatepress.com/premium/#colors', false ), - 'priority' => 30, - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - ) - ) - ); - } - - if ( class_exists( 'WP_Customize_Panel' ) ) { - if ( ! $wp_customize->get_panel( 'generate_layout_panel' ) ) { - $wp_customize->add_panel( - 'generate_layout_panel', - array( - 'priority' => 25, - 'title' => __( 'Layout', 'generatepress' ), - ) - ); - } - } - - $wp_customize->add_section( - 'generate_layout_container', - array( - 'title' => __( 'Container', 'generatepress' ), - 'priority' => 10, - 'panel' => 'generate_layout_panel', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[container_width]', - array( - 'default' => $defaults['container_width'], - 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_integer', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new Generate_Range_Slider_Control( - $wp_customize, - 'generate_settings[container_width]', - array( - 'type' => 'generatepress-range-slider', - 'label' => __( 'Container Width', 'generatepress' ), - 'section' => 'generate_layout_container', - 'settings' => array( - 'desktop' => 'generate_settings[container_width]', - ), - 'choices' => array( - 'desktop' => array( - 'min' => 700, - 'max' => 2000, - 'step' => 5, - 'edit' => true, - 'unit' => 'px', - ), - ), - 'priority' => 0, - ) - ) - ); - - $wp_customize->add_section( - 'generate_top_bar', - array( - 'title' => __( 'Top Bar', 'generatepress' ), - 'priority' => 15, - 'panel' => 'generate_layout_panel', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[top_bar_width]', - array( - 'default' => $defaults['top_bar_width'], - 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_choices', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - 'generate_settings[top_bar_width]', - array( - 'type' => 'select', - 'label' => __( 'Top Bar Width', 'generatepress' ), - 'section' => 'generate_top_bar', - 'choices' => array( - 'full' => __( 'Full', 'generatepress' ), - 'contained' => __( 'Contained', 'generatepress' ), - ), - 'settings' => 'generate_settings[top_bar_width]', - 'priority' => 5, - 'active_callback' => 'generate_is_top_bar_active', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[top_bar_inner_width]', - array( - 'default' => $defaults['top_bar_inner_width'], - 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_choices', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - 'generate_settings[top_bar_inner_width]', - array( - 'type' => 'select', - 'label' => __( 'Top Bar Inner Width', 'generatepress' ), - 'section' => 'generate_top_bar', - 'choices' => array( - 'full' => __( 'Full', 'generatepress' ), - 'contained' => __( 'Contained', 'generatepress' ), - ), - 'settings' => 'generate_settings[top_bar_inner_width]', - 'priority' => 10, - 'active_callback' => 'generate_is_top_bar_active', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[top_bar_alignment]', - array( - 'default' => $defaults['top_bar_alignment'], - 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_choices', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - 'generate_settings[top_bar_alignment]', - array( - 'type' => 'select', - 'label' => __( 'Top Bar Alignment', 'generatepress' ), - 'section' => 'generate_top_bar', - 'choices' => array( - 'left' => __( 'Left', 'generatepress' ), - 'center' => __( 'Center', 'generatepress' ), - 'right' => __( 'Right', 'generatepress' ), - ), - 'settings' => 'generate_settings[top_bar_alignment]', - 'priority' => 15, - 'active_callback' => 'generate_is_top_bar_active', - ) - ); - - $wp_customize->add_section( - 'generate_layout_header', - array( - 'title' => __( 'Header', 'generatepress' ), - 'priority' => 20, - 'panel' => 'generate_layout_panel', - ) - ); - - $wp_customize->add_setting( - 'generate_header_helper', - array( - 'default' => 'current', - 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_preset_layout', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - 'generate_header_helper', - array( - 'type' => 'select', - 'label' => __( 'Header Presets', 'generatepress' ), - 'section' => 'generate_layout_header', - 'choices' => array( - 'current' => __( 'Current', 'generatepress' ), - 'default' => __( 'Default', 'generatepress' ), - 'classic' => __( 'Classic', 'generatepress' ), - 'nav-before' => __( 'Navigation Before', 'generatepress' ), - 'nav-after' => __( 'Navigation After', 'generatepress' ), - 'nav-before-centered' => __( 'Navigation Before - Centered', 'generatepress' ), - 'nav-after-centered' => __( 'Navigation After - Centered', 'generatepress' ), - 'nav-left' => __( 'Navigation Left', 'generatepress' ), - ), - 'settings' => 'generate_header_helper', - 'priority' => 4, - ) - ); - - if ( ! $wp_customize->get_setting( 'generate_settings[site_title_font_size]' ) ) { - $typography_defaults = generate_get_default_fonts(); - - $wp_customize->add_setting( - 'generate_settings[site_title_font_size]', - array( - 'default' => $typography_defaults['site_title_font_size'], - 'type' => 'option', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage', - ) - ); - } - - if ( ! $wp_customize->get_setting( 'generate_spacing_settings[header_top]' ) ) { - $spacing_defaults = generate_spacing_get_defaults(); - - $wp_customize->add_setting( - 'generate_spacing_settings[header_top]', - array( - 'default' => $spacing_defaults['header_top'], - 'type' => 'option', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage', - ) - ); - } - - if ( ! $wp_customize->get_setting( 'generate_spacing_settings[header_bottom]' ) ) { - $spacing_defaults = generate_spacing_get_defaults(); - - $wp_customize->add_setting( - 'generate_spacing_settings[header_bottom]', - array( - 'default' => $spacing_defaults['header_bottom'], - 'type' => 'option', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage', - ) - ); - } - - $wp_customize->add_setting( - 'generate_settings[header_layout_setting]', - array( - 'default' => $defaults['header_layout_setting'], - 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_choices', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - 'generate_settings[header_layout_setting]', - array( - 'type' => 'select', - 'label' => __( 'Header Width', 'generatepress' ), - 'section' => 'generate_layout_header', - 'choices' => array( - 'fluid-header' => __( 'Full', 'generatepress' ), - 'contained-header' => __( 'Contained', 'generatepress' ), - ), - 'settings' => 'generate_settings[header_layout_setting]', - 'priority' => 5, - ) - ); - - $wp_customize->add_setting( - 'generate_settings[header_inner_width]', - array( - 'default' => $defaults['header_inner_width'], - 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_choices', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - 'generate_settings[header_inner_width]', - array( - 'type' => 'select', - 'label' => __( 'Inner Header Width', 'generatepress' ), - 'section' => 'generate_layout_header', - 'choices' => array( - 'contained' => __( 'Contained', 'generatepress' ), - 'full-width' => __( 'Full', 'generatepress' ), - ), - 'settings' => 'generate_settings[header_inner_width]', - 'priority' => 6, - ) - ); - - $wp_customize->add_setting( - 'generate_settings[header_alignment_setting]', - array( - 'default' => $defaults['header_alignment_setting'], - 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_choices', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - 'generate_settings[header_alignment_setting]', - array( - 'type' => 'select', - 'label' => __( 'Header Alignment', 'generatepress' ), - 'section' => 'generate_layout_header', - 'choices' => array( - 'left' => __( 'Left', 'generatepress' ), - 'center' => __( 'Center', 'generatepress' ), - 'right' => __( 'Right', 'generatepress' ), - ), - 'settings' => 'generate_settings[header_alignment_setting]', - 'priority' => 10, - ) - ); - - $wp_customize->add_section( - 'generate_layout_navigation', - array( - 'title' => __( 'Primary Navigation', 'generatepress' ), - 'priority' => 30, - 'panel' => 'generate_layout_panel', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[nav_layout_setting]', - array( - 'default' => $defaults['nav_layout_setting'], - 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_choices', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - 'generate_settings[nav_layout_setting]', - array( - 'type' => 'select', - 'label' => __( 'Navigation Width', 'generatepress' ), - 'section' => 'generate_layout_navigation', - 'choices' => array( - 'fluid-nav' => __( 'Full', 'generatepress' ), - 'contained-nav' => __( 'Contained', 'generatepress' ), - ), - 'settings' => 'generate_settings[nav_layout_setting]', - 'priority' => 15, - ) - ); - - $wp_customize->add_setting( - 'generate_settings[nav_inner_width]', - array( - 'default' => $defaults['nav_inner_width'], - 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_choices', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - 'generate_settings[nav_inner_width]', - array( - 'type' => 'select', - 'label' => __( 'Inner Navigation Width', 'generatepress' ), - 'section' => 'generate_layout_navigation', - 'choices' => array( - 'contained' => __( 'Contained', 'generatepress' ), - 'full-width' => __( 'Full', 'generatepress' ), - ), - 'settings' => 'generate_settings[nav_inner_width]', - 'priority' => 16, - ) - ); - - $wp_customize->add_setting( - 'generate_settings[nav_alignment_setting]', - array( - 'default' => $defaults['nav_alignment_setting'], - 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_choices', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - 'generate_settings[nav_alignment_setting]', - array( - 'type' => 'select', - 'label' => __( 'Navigation Alignment', 'generatepress' ), - 'section' => 'generate_layout_navigation', - 'choices' => array( - 'left' => __( 'Left', 'generatepress' ), - 'center' => __( 'Center', 'generatepress' ), - 'right' => __( 'Right', 'generatepress' ), - ), - 'settings' => 'generate_settings[nav_alignment_setting]', - 'priority' => 20, - ) - ); - - $wp_customize->add_setting( - 'generate_settings[nav_position_setting]', - array( - 'default' => $defaults['nav_position_setting'], - 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_choices', - 'transport' => 'refresh', - ) - ); - - $wp_customize->add_control( - 'generate_settings[nav_position_setting]', - array( - 'type' => 'select', - 'label' => __( 'Navigation Location', 'generatepress' ), - 'section' => 'generate_layout_navigation', - 'choices' => array( - 'nav-below-header' => __( 'Below Header', 'generatepress' ), - 'nav-above-header' => __( 'Above Header', 'generatepress' ), - 'nav-float-right' => __( 'Float Right', 'generatepress' ), - 'nav-float-left' => __( 'Float Left', 'generatepress' ), - 'nav-left-sidebar' => __( 'Left Sidebar', 'generatepress' ), - 'nav-right-sidebar' => __( 'Right Sidebar', 'generatepress' ), - '' => __( 'No Navigation', 'generatepress' ), - ), - 'settings' => 'generate_settings[nav_position_setting]', - 'priority' => 22, - ) - ); - - $wp_customize->add_setting( - 'generate_settings[nav_drop_point]', - array( - 'default' => $defaults['nav_drop_point'], - 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_empty_absint', - ) - ); - - $wp_customize->add_control( - new Generate_Range_Slider_Control( - $wp_customize, - 'generate_settings[nav_drop_point]', - array( - 'label' => __( 'Navigation Drop Point', 'generatepress' ), - 'sub_description' => __( 'The width when the navigation ceases to float and drops below your logo.', 'generatepress' ), - 'section' => 'generate_layout_navigation', - 'settings' => array( - 'desktop' => 'generate_settings[nav_drop_point]', - ), - 'choices' => array( - 'desktop' => array( - 'min' => 500, - 'max' => 2000, - 'step' => 10, - 'edit' => true, - 'unit' => 'px', - ), - ), - 'priority' => 22, - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[nav_dropdown_type]', - array( - 'default' => $defaults['nav_dropdown_type'], - 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_choices', - ) - ); - - $wp_customize->add_control( - 'generate_settings[nav_dropdown_type]', - array( - 'type' => 'select', - 'label' => __( 'Navigation Dropdown', 'generatepress' ), - 'section' => 'generate_layout_navigation', - 'choices' => array( - 'hover' => __( 'Hover', 'generatepress' ), - 'click' => __( 'Click - Menu Item', 'generatepress' ), - 'click-arrow' => __( 'Click - Arrow', 'generatepress' ), - ), - 'settings' => 'generate_settings[nav_dropdown_type]', - 'priority' => 22, - ) - ); - - $wp_customize->add_setting( - 'generate_settings[nav_dropdown_direction]', - array( - 'default' => $defaults['nav_dropdown_direction'], - 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_choices', - ) - ); - - $wp_customize->add_control( - 'generate_settings[nav_dropdown_direction]', - array( - 'type' => 'select', - 'label' => __( 'Dropdown Direction', 'generatepress' ), - 'section' => 'generate_layout_navigation', - 'choices' => array( - 'right' => __( 'Right', 'generatepress' ), - 'left' => __( 'Left', 'generatepress' ), - ), - 'settings' => 'generate_settings[nav_dropdown_direction]', - 'priority' => 22, - ) - ); - - $wp_customize->add_setting( - 'generate_settings[nav_search]', - array( - 'default' => $defaults['nav_search'], - 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_choices', - ) - ); - - $wp_customize->add_control( - 'generate_settings[nav_search]', - array( - 'type' => 'select', - 'label' => __( 'Navigation Search', 'generatepress' ), - 'section' => 'generate_layout_navigation', - 'choices' => array( - 'enable' => __( 'Enable', 'generatepress' ), - 'disable' => __( 'Disable', 'generatepress' ), - ), - 'settings' => 'generate_settings[nav_search]', - 'priority' => 23, - ) - ); - - $wp_customize->add_setting( - 'generate_settings[content_layout_setting]', - array( - 'default' => $defaults['content_layout_setting'], - 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_choices', - ) - ); - - $wp_customize->add_control( - 'generate_settings[content_layout_setting]', - array( - 'type' => 'select', - 'label' => __( 'Content Layout', 'generatepress' ), - 'section' => 'generate_layout_container', - 'choices' => array( - 'separate-containers' => __( 'Separate Containers', 'generatepress' ), - 'one-container' => __( 'One Container', 'generatepress' ), - ), - 'settings' => 'generate_settings[content_layout_setting]', - 'priority' => 25, - ) - ); - - $wp_customize->add_setting( - 'generate_settings[container_alignment]', - array( - 'default' => $defaults['container_alignment'], - 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_choices', - ) - ); - - $wp_customize->add_control( - 'generate_settings[container_alignment]', - array( - 'type' => 'select', - 'label' => __( 'Container Alignment', 'generatepress' ), - 'section' => 'generate_layout_container', - 'choices' => array( - 'boxes' => __( 'Boxes', 'generatepress' ), - 'text' => __( 'Text', 'generatepress' ), - ), - 'settings' => 'generate_settings[container_alignment]', - 'priority' => 30, - ) - ); - - $wp_customize->add_section( - 'generate_layout_sidebars', - array( - 'title' => __( 'Sidebars', 'generatepress' ), - 'priority' => 40, - 'panel' => 'generate_layout_panel', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[layout_setting]', - array( - 'default' => $defaults['layout_setting'], - 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_choices', - ) - ); - - $wp_customize->add_control( - 'generate_settings[layout_setting]', - array( - 'type' => 'select', - 'label' => __( 'Sidebar Layout', 'generatepress' ), - 'section' => 'generate_layout_sidebars', - 'choices' => array( - 'left-sidebar' => __( 'Sidebar / Content', 'generatepress' ), - 'right-sidebar' => __( 'Content / Sidebar', 'generatepress' ), - 'no-sidebar' => __( 'Content (no sidebars)', 'generatepress' ), - 'both-sidebars' => __( 'Sidebar / Content / Sidebar', 'generatepress' ), - 'both-left' => __( 'Sidebar / Sidebar / Content', 'generatepress' ), - 'both-right' => __( 'Content / Sidebar / Sidebar', 'generatepress' ), - ), - 'settings' => 'generate_settings[layout_setting]', - 'priority' => 30, - ) - ); - - $wp_customize->add_setting( - 'generate_settings[blog_layout_setting]', - array( - 'default' => $defaults['blog_layout_setting'], - 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_choices', - ) - ); - - $wp_customize->add_control( - 'generate_settings[blog_layout_setting]', - array( - 'type' => 'select', - 'label' => __( 'Blog Sidebar Layout', 'generatepress' ), - 'section' => 'generate_layout_sidebars', - 'choices' => array( - 'left-sidebar' => __( 'Sidebar / Content', 'generatepress' ), - 'right-sidebar' => __( 'Content / Sidebar', 'generatepress' ), - 'no-sidebar' => __( 'Content (no sidebars)', 'generatepress' ), - 'both-sidebars' => __( 'Sidebar / Content / Sidebar', 'generatepress' ), - 'both-left' => __( 'Sidebar / Sidebar / Content', 'generatepress' ), - 'both-right' => __( 'Content / Sidebar / Sidebar', 'generatepress' ), - ), - 'settings' => 'generate_settings[blog_layout_setting]', - 'priority' => 35, - ) - ); - - $wp_customize->add_setting( - 'generate_settings[single_layout_setting]', - array( - 'default' => $defaults['single_layout_setting'], - 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_choices', - ) - ); - - $wp_customize->add_control( - 'generate_settings[single_layout_setting]', - array( - 'type' => 'select', - 'label' => __( 'Single Post Sidebar Layout', 'generatepress' ), - 'section' => 'generate_layout_sidebars', - 'choices' => array( - 'left-sidebar' => __( 'Sidebar / Content', 'generatepress' ), - 'right-sidebar' => __( 'Content / Sidebar', 'generatepress' ), - 'no-sidebar' => __( 'Content (no sidebars)', 'generatepress' ), - 'both-sidebars' => __( 'Sidebar / Content / Sidebar', 'generatepress' ), - 'both-left' => __( 'Sidebar / Sidebar / Content', 'generatepress' ), - 'both-right' => __( 'Content / Sidebar / Sidebar', 'generatepress' ), - ), - 'settings' => 'generate_settings[single_layout_setting]', - 'priority' => 36, - ) - ); - - $wp_customize->add_section( - 'generate_layout_footer', - array( - 'title' => __( 'Footer', 'generatepress' ), - 'priority' => 50, - 'panel' => 'generate_layout_panel', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[footer_layout_setting]', - array( - 'default' => $defaults['footer_layout_setting'], - 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_choices', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - 'generate_settings[footer_layout_setting]', - array( - 'type' => 'select', - 'label' => __( 'Footer Width', 'generatepress' ), - 'section' => 'generate_layout_footer', - 'choices' => array( - 'fluid-footer' => __( 'Full', 'generatepress' ), - 'contained-footer' => __( 'Contained', 'generatepress' ), - ), - 'settings' => 'generate_settings[footer_layout_setting]', - 'priority' => 40, - ) - ); - - $wp_customize->add_setting( - 'generate_settings[footer_inner_width]', - array( - 'default' => $defaults['footer_inner_width'], - 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_choices', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - 'generate_settings[footer_inner_width]', - array( - 'type' => 'select', - 'label' => __( 'Inner Footer Width', 'generatepress' ), - 'section' => 'generate_layout_footer', - 'choices' => array( - 'contained' => __( 'Contained', 'generatepress' ), - 'full-width' => __( 'Full', 'generatepress' ), - ), - 'settings' => 'generate_settings[footer_inner_width]', - 'priority' => 41, - ) - ); - - $wp_customize->add_setting( - 'generate_settings[footer_widget_setting]', - array( - 'default' => $defaults['footer_widget_setting'], - 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_choices', - ) - ); - - $wp_customize->add_control( - 'generate_settings[footer_widget_setting]', - array( - 'type' => 'select', - 'label' => __( 'Footer Widgets', 'generatepress' ), - 'section' => 'generate_layout_footer', - 'choices' => array( - '0' => '0', - '1' => '1', - '2' => '2', - '3' => '3', - '4' => '4', - '5' => '5', - ), - 'settings' => 'generate_settings[footer_widget_setting]', - 'priority' => 45, - ) - ); - - $wp_customize->add_setting( - 'generate_settings[footer_bar_alignment]', - array( - 'default' => $defaults['footer_bar_alignment'], - 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_choices', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - 'generate_settings[footer_bar_alignment]', - array( - 'type' => 'select', - 'label' => __( 'Footer Bar Alignment', 'generatepress' ), - 'section' => 'generate_layout_footer', - 'choices' => array( - 'left' => __( 'Left', 'generatepress' ), - 'center' => __( 'Center', 'generatepress' ), - 'right' => __( 'Right', 'generatepress' ), - ), - 'settings' => 'generate_settings[footer_bar_alignment]', - 'priority' => 47, - 'active_callback' => 'generate_is_footer_bar_active', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[back_to_top]', - array( - 'default' => $defaults['back_to_top'], - 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_choices', - ) - ); - - $wp_customize->add_control( - 'generate_settings[back_to_top]', - array( - 'type' => 'select', - 'label' => __( 'Back to Top Button', 'generatepress' ), - 'section' => 'generate_layout_footer', - 'choices' => array( - 'enable' => __( 'Enable', 'generatepress' ), - '' => __( 'Disable', 'generatepress' ), - ), - 'settings' => 'generate_settings[back_to_top]', - 'priority' => 50, - ) - ); - - $wp_customize->add_section( - 'generate_blog_section', - array( - 'title' => __( 'Blog', 'generatepress' ), - 'priority' => 55, - 'panel' => 'generate_layout_panel', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[post_content]', - array( - 'default' => $defaults['post_content'], - 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_blog_excerpt', - ) - ); - - $wp_customize->add_control( - 'blog_content_control', - array( - 'type' => 'select', - 'label' => __( 'Content Type', 'generatepress' ), - 'section' => 'generate_blog_section', - 'choices' => array( - 'full' => __( 'Full Content', 'generatepress' ), - 'excerpt' => __( 'Excerpt', 'generatepress' ), - ), - 'settings' => 'generate_settings[post_content]', - 'priority' => 10, - ) - ); - - if ( ! function_exists( 'generate_blog_customize_register' ) && ! defined( 'GP_PREMIUM_VERSION' ) ) { - $wp_customize->add_control( - new Generate_Customize_Misc_Control( - $wp_customize, - 'blog_get_addon_desc', - array( - 'section' => 'generate_blog_section', - 'type' => 'addon', - 'label' => __( 'Learn more', 'generatepress' ), - 'description' => __( 'More options are available for this section in our premium version.', 'generatepress' ), - 'url' => generate_get_premium_url( 'https://generatepress.com/premium/#blog', false ), - 'priority' => 30, - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - ) - ) - ); - } - - $wp_customize->add_section( - 'generate_general_section', - array( - 'title' => __( 'General', 'generatepress' ), - 'priority' => 99, - ) - ); - - if ( ! apply_filters( 'generate_fontawesome_essentials', false ) ) { - $wp_customize->add_setting( - 'generate_settings[font_awesome_essentials]', - array( - 'default' => $defaults['font_awesome_essentials'], - 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_checkbox', - ) - ); - - $wp_customize->add_control( - 'generate_settings[font_awesome_essentials]', - array( - 'type' => 'checkbox', - 'label' => __( 'Load essential icons only', 'generatepress' ), - 'description' => __( 'Load essential Font Awesome icons instead of the full library.', 'generatepress' ), - 'section' => 'generate_general_section', - 'settings' => 'generate_settings[font_awesome_essentials]', - ) - ); - } - - $show_flexbox_option = true; - - if ( defined( 'GP_PREMIUM_VERSION' ) && version_compare( GP_PREMIUM_VERSION, '1.11.0-alpha.1', '<' ) ) { - $show_flexbox_option = false; - } - - if ( generate_is_using_flexbox() ) { - $show_flexbox_option = true; - } - - $show_flexbox_option = apply_filters( 'generate_show_flexbox_customizer_option', $show_flexbox_option ); - - if ( $show_flexbox_option ) { - $wp_customize->add_setting( - 'generate_settings[structure]', - array( - 'default' => $defaults['structure'], - 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_choices', - ) - ); - - $wp_customize->add_control( - 'generate_settings[structure]', - array( - 'type' => 'select', - 'label' => __( 'Structure', 'generatepress' ), - 'section' => 'generate_general_section', - 'choices' => array( - 'flexbox' => __( 'Flexbox', 'generatepress' ), - 'floats' => __( 'Floats', 'generatepress' ), - ), - 'description' => sprintf( - '%1$s %2$s', - __( 'Caution:', 'generatepress' ), - sprintf( - /* translators: Learn more here */ - __( 'Switching your structure can change how your website displays. Review your website thoroughly before publishing this change, or use a staging site to review the potential changes. Learn more %s.', 'generatepress' ), - '' . __( 'here', 'generatepress' ) . '' - ) - ), - 'settings' => 'generate_settings[structure]', - ) - ); - } - - $wp_customize->add_setting( - 'generate_settings[icons]', - array( - 'default' => $defaults['icons'], - 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_choices', - ) - ); - - $wp_customize->add_control( - 'generate_settings[icons]', - array( - 'type' => 'select', - 'label' => __( 'Icon Type', 'generatepress' ), - 'section' => 'generate_general_section', - 'choices' => array( - 'svg' => __( 'SVG', 'generatepress' ), - 'font' => __( 'Font', 'generatepress' ), - ), - 'settings' => 'generate_settings[icons]', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[combine_css]', - array( - 'default' => $defaults['combine_css'], - 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_checkbox', - ) - ); - - $wp_customize->add_control( - 'generate_settings[combine_css]', - array( - 'type' => 'checkbox', - 'label' => __( 'Combine CSS', 'generatepress' ), - 'description' => __( 'Reduce the number of CSS file requests and use a lite version of our grid system.', 'generatepress' ), - 'section' => 'generate_general_section', - 'active_callback' => 'generate_is_using_floats_callback', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[dynamic_css_cache]', - array( - 'default' => $defaults['dynamic_css_cache'], - 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_checkbox', - ) - ); - - $wp_customize->add_control( - 'generate_settings[dynamic_css_cache]', - array( - 'type' => 'checkbox', - 'label' => __( 'Cache dynamic CSS', 'generatepress' ), - 'description' => __( 'Cache CSS generated by your options to boost performance.', 'generatepress' ), - 'section' => 'generate_general_section', - ) - ); - } -} +get_control( 'blogdescription' ) ) { + $wp_customize->get_control( 'blogdescription' )->priority = 3; + $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; + } + + if ( $wp_customize->get_control( 'blogname' ) ) { + $wp_customize->get_control( 'blogname' )->priority = 1; + $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; + } + + if ( $wp_customize->get_control( 'custom_logo' ) ) { + $wp_customize->get_setting( 'custom_logo' )->transport = 'refresh'; + } + + if ( method_exists( $wp_customize, 'register_control_type' ) ) { + $wp_customize->register_control_type( 'Generate_Customize_Misc_Control' ); + $wp_customize->register_control_type( 'Generate_Range_Slider_Control' ); + } + + if ( method_exists( $wp_customize, 'register_section_type' ) ) { + $wp_customize->register_section_type( 'GeneratePress_Upsell_Section' ); + } + + if ( isset( $wp_customize->selective_refresh ) ) { + $wp_customize->selective_refresh->add_partial( + 'blogname', + array( + 'selector' => '.main-title a', + 'render_callback' => 'generate_customize_partial_blogname', + ) + ); + + $wp_customize->selective_refresh->add_partial( + 'blogdescription', + array( + 'selector' => '.site-description', + 'render_callback' => 'generate_customize_partial_blogdescription', + ) + ); + } + + if ( ! defined( 'GP_PREMIUM_VERSION' ) ) { + $wp_customize->add_section( + new GeneratePress_Upsell_Section( + $wp_customize, + 'generatepress_upsell_section', + array( + 'pro_text' => __( 'Premium Modules Available', 'generatepress' ), + 'pro_url' => generate_get_premium_url( 'https://generatepress.com/premium' ), + 'capability' => 'edit_theme_options', + 'priority' => 0, + 'type' => 'gp-upsell-section', + ) + ) + ); + } + + $wp_customize->add_setting( + 'generate_settings[hide_title]', + array( + 'default' => $defaults['hide_title'], + 'type' => 'option', + 'sanitize_callback' => 'generate_sanitize_checkbox', + ) + ); + + $wp_customize->add_control( + 'generate_settings[hide_title]', + array( + 'type' => 'checkbox', + 'label' => __( 'Hide site title', 'generatepress' ), + 'section' => 'title_tagline', + 'priority' => 2, + ) + ); + + $wp_customize->add_setting( + 'generate_settings[hide_tagline]', + array( + 'default' => $defaults['hide_tagline'], + 'type' => 'option', + 'sanitize_callback' => 'generate_sanitize_checkbox', + ) + ); + + $wp_customize->add_control( + 'generate_settings[hide_tagline]', + array( + 'type' => 'checkbox', + 'label' => __( 'Hide site tagline', 'generatepress' ), + 'section' => 'title_tagline', + 'priority' => 4, + ) + ); + + if ( ! function_exists( 'the_custom_logo' ) ) { + $wp_customize->add_setting( + 'generate_settings[logo]', + array( + 'default' => $defaults['logo'], + 'type' => 'option', + 'sanitize_callback' => 'esc_url_raw', + ) + ); + + $wp_customize->add_control( + new WP_Customize_Image_Control( + $wp_customize, + 'generate_settings[logo]', + array( + 'label' => __( 'Logo', 'generatepress' ), + 'section' => 'title_tagline', + 'settings' => 'generate_settings[logo]', + ) + ) + ); + } + + $wp_customize->add_setting( + 'generate_settings[retina_logo]', + array( + 'default' => $defaults['retina_logo'], + 'type' => 'option', + 'sanitize_callback' => 'esc_url_raw', + ) + ); + + $wp_customize->add_control( + new WP_Customize_Image_Control( + $wp_customize, + 'generate_settings[retina_logo]', + array( + 'label' => __( 'Retina Logo', 'generatepress' ), + 'section' => 'title_tagline', + 'settings' => 'generate_settings[retina_logo]', + 'active_callback' => 'generate_has_custom_logo_callback', + ) + ) + ); + + $wp_customize->add_setting( + 'generate_settings[logo_width]', + array( + 'default' => $defaults['logo_width'], + 'type' => 'option', + 'sanitize_callback' => 'generate_sanitize_empty_absint', + 'transport' => 'postMessage', + ) + ); + + $wp_customize->add_control( + new Generate_Range_Slider_Control( + $wp_customize, + 'generate_settings[logo_width]', + array( + 'label' => __( 'Logo Width', 'generatepress' ), + 'section' => 'title_tagline', + 'settings' => array( + 'desktop' => 'generate_settings[logo_width]', + ), + 'choices' => array( + 'desktop' => array( + 'min' => 20, + 'max' => 1200, + 'step' => 10, + 'edit' => true, + 'unit' => 'px', + ), + ), + 'active_callback' => 'generate_has_custom_logo_callback', + ) + ) + ); + + $wp_customize->add_setting( + 'generate_settings[inline_logo_site_branding]', + array( + 'default' => $defaults['inline_logo_site_branding'], + 'type' => 'option', + 'sanitize_callback' => 'generate_sanitize_checkbox', + ) + ); + + $wp_customize->add_control( + 'generate_settings[inline_logo_site_branding]', + array( + 'type' => 'checkbox', + 'label' => esc_html__( 'Place logo next to title', 'generatepress' ), + 'section' => 'title_tagline', + 'active_callback' => 'generate_show_inline_logo_callback', + ) + ); + + $wp_customize->add_section( + 'body_section', + array( + 'title' => $wp_customize->get_panel( 'generate_colors_panel' ) ? __( 'Body', 'generatepress' ) : __( 'Colors', 'generatepress' ), + 'capability' => 'edit_theme_options', + 'priority' => 30, + 'panel' => $wp_customize->get_panel( 'generate_colors_panel' ) ? 'generate_colors_panel' : false, + ) + ); + + $wp_customize->add_setting( + 'generate_settings[background_color]', + array( + 'default' => $defaults['background_color'], + 'type' => 'option', + 'sanitize_callback' => 'generate_sanitize_hex_color', + 'transport' => 'postMessage', + ) + ); + + $wp_customize->add_control( + new WP_Customize_Color_Control( + $wp_customize, + 'generate_settings[background_color]', + array( + 'label' => __( 'Background Color', 'generatepress' ), + 'section' => 'body_section', + 'settings' => 'generate_settings[background_color]', + ) + ) + ); + + $wp_customize->add_setting( + 'generate_settings[text_color]', + array( + 'default' => $defaults['text_color'], + 'type' => 'option', + 'sanitize_callback' => 'generate_sanitize_hex_color', + 'transport' => 'postMessage', + ) + ); + + $wp_customize->add_control( + new WP_Customize_Color_Control( + $wp_customize, + 'generate_settings[text_color]', + array( + 'label' => __( 'Text Color', 'generatepress' ), + 'section' => 'body_section', + 'settings' => 'generate_settings[text_color]', + ) + ) + ); + + $wp_customize->add_setting( + 'generate_settings[link_color]', + array( + 'default' => $defaults['link_color'], + 'type' => 'option', + 'sanitize_callback' => 'generate_sanitize_hex_color', + 'transport' => 'postMessage', + ) + ); + + $wp_customize->add_control( + new WP_Customize_Color_Control( + $wp_customize, + 'generate_settings[link_color]', + array( + 'label' => __( 'Link Color', 'generatepress' ), + 'section' => 'body_section', + 'settings' => 'generate_settings[link_color]', + ) + ) + ); + + $wp_customize->add_setting( + 'generate_settings[link_color_hover]', + array( + 'default' => $defaults['link_color_hover'], + 'type' => 'option', + 'sanitize_callback' => 'generate_sanitize_hex_color', + 'transport' => 'postMessage', + ) + ); + + $wp_customize->add_control( + new WP_Customize_Color_Control( + $wp_customize, + 'generate_settings[link_color_hover]', + array( + 'label' => __( 'Link Color Hover', 'generatepress' ), + 'section' => 'body_section', + 'settings' => 'generate_settings[link_color_hover]', + ) + ) + ); + + if ( '' !== generate_get_option( 'link_color_visited' ) ) { + $wp_customize->add_setting( + 'generate_settings[link_color_visited]', + array( + 'default' => $defaults['link_color_visited'], + 'type' => 'option', + 'sanitize_callback' => 'generate_sanitize_hex_color', + 'transport' => 'refresh', + ) + ); + + $wp_customize->add_control( + new WP_Customize_Color_Control( + $wp_customize, + 'generate_settings[link_color_visited]', + array( + 'label' => __( 'Link Color Visited', 'generatepress' ), + 'section' => 'body_section', + 'settings' => 'generate_settings[link_color_visited]', + ) + ) + ); + } + + $color_defaults = generate_get_color_defaults(); + + if ( ! $wp_customize->get_setting( 'generate_settings[blog_post_title_color]' ) ) { + $wp_customize->add_setting( + 'generate_settings[blog_post_title_color]', + array( + 'default' => $color_defaults['blog_post_title_color'], + 'type' => 'option', + 'sanitize_callback' => 'generate_sanitize_hex_color', + 'transport' => 'postMessage', + ) + ); + + $wp_customize->add_control( + new WP_Customize_Color_Control( + $wp_customize, + 'blog_post_title_color', + array( + 'label' => __( 'Blog Post Title', 'generatepress' ), + 'section' => $wp_customize->get_section( 'content_color_section' ) ? 'content_color_section' : 'body_section', + 'settings' => 'generate_settings[blog_post_title_color]', + ) + ) + ); + + $wp_customize->add_setting( + 'generate_settings[blog_post_title_hover_color]', + array( + 'default' => $color_defaults['blog_post_title_hover_color'], + 'type' => 'option', + 'sanitize_callback' => 'generate_sanitize_hex_color', + 'transport' => 'postMessage', + ) + ); + + $wp_customize->add_control( + new WP_Customize_Color_Control( + $wp_customize, + 'blog_post_title_hover_color', + array( + 'label' => __( 'Blog Post Title Hover', 'generatepress' ), + 'section' => $wp_customize->get_section( 'content_color_section' ) ? 'content_color_section' : 'body_section', + 'settings' => 'generate_settings[blog_post_title_hover_color]', + ) + ) + ); + } + + $wp_customize->add_setting( + 'nav_color_presets', + array( + 'default' => 'current', + 'type' => 'option', + 'sanitize_callback' => 'generate_sanitize_preset_layout', + 'transport' => 'postMessage', + ) + ); + + $wp_customize->add_control( + 'nav_color_presets', + array( + 'type' => 'select', + 'label' => __( 'Navigation Color Presets', 'generatepress' ), + 'section' => $wp_customize->get_section( 'navigation_color_section' ) ? 'navigation_color_section' : 'body_section', + 'priority' => $wp_customize->get_section( 'navigation_color_section' ) ? 0 : null, + 'choices' => array( + 'current' => __( 'Current', 'generatepress' ), + 'default' => __( 'Default', 'generatepress' ), + 'classic' => __( 'Classic', 'generatepress' ), + 'grey' => __( 'Grey', 'generatepress' ), + 'red' => __( 'Red', 'generatepress' ), + 'green' => __( 'Green', 'generatepress' ), + 'blue' => __( 'Blue', 'generatepress' ), + ), + 'settings' => 'nav_color_presets', + ) + ); + + if ( ! $wp_customize->get_setting( 'generate_settings[navigation_background_color]' ) ) { + $wp_customize->add_setting( + 'generate_settings[navigation_background_color]', + array( + 'default' => $color_defaults['navigation_background_color'], + 'type' => 'option', + 'sanitize_callback' => 'generate_sanitize_rgba_color', + 'transport' => 'postMessage', + ) + ); + + $wp_customize->add_setting( + 'generate_settings[navigation_text_color]', + array( + 'default' => $color_defaults['navigation_text_color'], + 'type' => 'option', + 'sanitize_callback' => 'generate_sanitize_hex_color', + 'transport' => 'postMessage', + ) + ); + + $wp_customize->add_setting( + 'generate_settings[navigation_background_hover_color]', + array( + 'default' => $color_defaults['navigation_background_hover_color'], + 'type' => 'option', + 'transport' => 'postMessage', + 'sanitize_callback' => 'generate_sanitize_rgba_color', + ) + ); + + $wp_customize->add_setting( + 'generate_settings[navigation_text_hover_color]', + array( + 'default' => $color_defaults['navigation_text_hover_color'], + 'type' => 'option', + 'transport' => 'postMessage', + 'sanitize_callback' => 'generate_sanitize_hex_color', + ) + ); + + $wp_customize->add_setting( + 'generate_settings[navigation_background_current_color]', + array( + 'default' => $color_defaults['navigation_background_current_color'], + 'type' => 'option', + 'sanitize_callback' => 'generate_sanitize_rgba_color', + 'transport' => 'postMessage', + ) + ); + + $wp_customize->add_setting( + 'generate_settings[navigation_text_current_color]', + array( + 'default' => $color_defaults['navigation_text_current_color'], + 'type' => 'option', + 'sanitize_callback' => 'generate_sanitize_hex_color', + 'transport' => 'postMessage', + ) + ); + + $wp_customize->add_setting( + 'generate_settings[subnavigation_background_color]', + array( + 'default' => $color_defaults['subnavigation_background_color'], + 'type' => 'option', + 'transport' => 'postMessage', + 'sanitize_callback' => 'generate_sanitize_rgba_color', + ) + ); + + $wp_customize->add_setting( + 'generate_settings[subnavigation_text_color]', + array( + 'default' => $color_defaults['subnavigation_text_color'], + 'type' => 'option', + 'sanitize_callback' => 'generate_sanitize_hex_color', + 'transport' => 'postMessage', + ) + ); + + $wp_customize->add_setting( + 'generate_settings[subnavigation_background_hover_color]', + array( + 'default' => $color_defaults['subnavigation_background_hover_color'], + 'type' => 'option', + 'transport' => 'postMessage', + 'sanitize_callback' => 'generate_sanitize_rgba_color', + ) + ); + + $wp_customize->add_setting( + 'generate_settings[subnavigation_text_hover_color]', + array( + 'default' => $color_defaults['subnavigation_text_hover_color'], + 'type' => 'option', + 'sanitize_callback' => 'generate_sanitize_hex_color', + 'transport' => 'postMessage', + ) + ); + + $wp_customize->add_setting( + 'generate_settings[subnavigation_background_current_color]', + array( + 'default' => $color_defaults['subnavigation_background_current_color'], + 'type' => 'option', + 'transport' => 'postMessage', + 'sanitize_callback' => 'generate_sanitize_rgba_color', + ) + ); + + $wp_customize->add_setting( + 'generate_settings[subnavigation_text_current_color]', + array( + 'default' => $color_defaults['subnavigation_text_current_color'], + 'type' => 'option', + 'sanitize_callback' => 'generate_sanitize_hex_color', + 'transport' => 'postMessage', + ) + ); + } + + if ( ! function_exists( 'generate_colors_customize_register' ) && ! defined( 'GP_PREMIUM_VERSION' ) ) { + $wp_customize->add_control( + new Generate_Customize_Misc_Control( + $wp_customize, + 'colors_get_addon_desc', + array( + 'section' => 'body_section', + 'type' => 'addon', + 'label' => __( 'Learn More', 'generatepress' ), + 'description' => __( 'More options are available for this section in our premium version.', 'generatepress' ), + 'url' => generate_get_premium_url( 'https://generatepress.com/premium/#colors', false ), + 'priority' => 30, + 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', + ) + ) + ); + } + + if ( class_exists( 'WP_Customize_Panel' ) ) { + if ( ! $wp_customize->get_panel( 'generate_layout_panel' ) ) { + $wp_customize->add_panel( + 'generate_layout_panel', + array( + 'priority' => 25, + 'title' => __( 'Layout', 'generatepress' ), + ) + ); + } + } + + $wp_customize->add_section( + 'generate_layout_container', + array( + 'title' => __( 'Container', 'generatepress' ), + 'priority' => 10, + 'panel' => 'generate_layout_panel', + ) + ); + + $wp_customize->add_setting( + 'generate_settings[container_width]', + array( + 'default' => $defaults['container_width'], + 'type' => 'option', + 'sanitize_callback' => 'generate_sanitize_integer', + 'transport' => 'postMessage', + ) + ); + + $wp_customize->add_control( + new Generate_Range_Slider_Control( + $wp_customize, + 'generate_settings[container_width]', + array( + 'type' => 'generatepress-range-slider', + 'label' => __( 'Container Width', 'generatepress' ), + 'section' => 'generate_layout_container', + 'settings' => array( + 'desktop' => 'generate_settings[container_width]', + ), + 'choices' => array( + 'desktop' => array( + 'min' => 700, + 'max' => 2000, + 'step' => 5, + 'edit' => true, + 'unit' => 'px', + ), + ), + 'priority' => 0, + ) + ) + ); + + $wp_customize->add_section( + 'generate_top_bar', + array( + 'title' => __( 'Top Bar', 'generatepress' ), + 'priority' => 15, + 'panel' => 'generate_layout_panel', + ) + ); + + $wp_customize->add_setting( + 'generate_settings[top_bar_width]', + array( + 'default' => $defaults['top_bar_width'], + 'type' => 'option', + 'sanitize_callback' => 'generate_sanitize_choices', + 'transport' => 'postMessage', + ) + ); + + $wp_customize->add_control( + 'generate_settings[top_bar_width]', + array( + 'type' => 'select', + 'label' => __( 'Top Bar Width', 'generatepress' ), + 'section' => 'generate_top_bar', + 'choices' => array( + 'full' => __( 'Full', 'generatepress' ), + 'contained' => __( 'Contained', 'generatepress' ), + ), + 'settings' => 'generate_settings[top_bar_width]', + 'priority' => 5, + 'active_callback' => 'generate_is_top_bar_active', + ) + ); + + $wp_customize->add_setting( + 'generate_settings[top_bar_inner_width]', + array( + 'default' => $defaults['top_bar_inner_width'], + 'type' => 'option', + 'sanitize_callback' => 'generate_sanitize_choices', + 'transport' => 'postMessage', + ) + ); + + $wp_customize->add_control( + 'generate_settings[top_bar_inner_width]', + array( + 'type' => 'select', + 'label' => __( 'Top Bar Inner Width', 'generatepress' ), + 'section' => 'generate_top_bar', + 'choices' => array( + 'full' => __( 'Full', 'generatepress' ), + 'contained' => __( 'Contained', 'generatepress' ), + ), + 'settings' => 'generate_settings[top_bar_inner_width]', + 'priority' => 10, + 'active_callback' => 'generate_is_top_bar_active', + ) + ); + + $wp_customize->add_setting( + 'generate_settings[top_bar_alignment]', + array( + 'default' => $defaults['top_bar_alignment'], + 'type' => 'option', + 'sanitize_callback' => 'generate_sanitize_choices', + 'transport' => 'postMessage', + ) + ); + + $wp_customize->add_control( + 'generate_settings[top_bar_alignment]', + array( + 'type' => 'select', + 'label' => __( 'Top Bar Alignment', 'generatepress' ), + 'section' => 'generate_top_bar', + 'choices' => array( + 'left' => __( 'Left', 'generatepress' ), + 'center' => __( 'Center', 'generatepress' ), + 'right' => __( 'Right', 'generatepress' ), + ), + 'settings' => 'generate_settings[top_bar_alignment]', + 'priority' => 15, + 'active_callback' => 'generate_is_top_bar_active', + ) + ); + + $wp_customize->add_section( + 'generate_layout_header', + array( + 'title' => __( 'Header', 'generatepress' ), + 'priority' => 20, + 'panel' => 'generate_layout_panel', + ) + ); + + $wp_customize->add_setting( + 'generate_header_helper', + array( + 'default' => 'current', + 'type' => 'option', + 'sanitize_callback' => 'generate_sanitize_preset_layout', + 'transport' => 'postMessage', + ) + ); + + $wp_customize->add_control( + 'generate_header_helper', + array( + 'type' => 'select', + 'label' => __( 'Header Presets', 'generatepress' ), + 'section' => 'generate_layout_header', + 'choices' => array( + 'current' => __( 'Current', 'generatepress' ), + 'default' => __( 'Default', 'generatepress' ), + 'classic' => __( 'Classic', 'generatepress' ), + 'nav-before' => __( 'Navigation Before', 'generatepress' ), + 'nav-after' => __( 'Navigation After', 'generatepress' ), + 'nav-before-centered' => __( 'Navigation Before - Centered', 'generatepress' ), + 'nav-after-centered' => __( 'Navigation After - Centered', 'generatepress' ), + 'nav-left' => __( 'Navigation Left', 'generatepress' ), + ), + 'settings' => 'generate_header_helper', + 'priority' => 4, + ) + ); + + if ( ! $wp_customize->get_setting( 'generate_settings[site_title_font_size]' ) ) { + $typography_defaults = generate_get_default_fonts(); + + $wp_customize->add_setting( + 'generate_settings[site_title_font_size]', + array( + 'default' => $typography_defaults['site_title_font_size'], + 'type' => 'option', + 'sanitize_callback' => 'absint', + 'transport' => 'postMessage', + ) + ); + } + + if ( ! $wp_customize->get_setting( 'generate_spacing_settings[header_top]' ) ) { + $spacing_defaults = generate_spacing_get_defaults(); + + $wp_customize->add_setting( + 'generate_spacing_settings[header_top]', + array( + 'default' => $spacing_defaults['header_top'], + 'type' => 'option', + 'sanitize_callback' => 'absint', + 'transport' => 'postMessage', + ) + ); + } + + if ( ! $wp_customize->get_setting( 'generate_spacing_settings[header_bottom]' ) ) { + $spacing_defaults = generate_spacing_get_defaults(); + + $wp_customize->add_setting( + 'generate_spacing_settings[header_bottom]', + array( + 'default' => $spacing_defaults['header_bottom'], + 'type' => 'option', + 'sanitize_callback' => 'absint', + 'transport' => 'postMessage', + ) + ); + } + + $wp_customize->add_setting( + 'generate_settings[header_layout_setting]', + array( + 'default' => $defaults['header_layout_setting'], + 'type' => 'option', + 'sanitize_callback' => 'generate_sanitize_choices', + 'transport' => 'postMessage', + ) + ); + + $wp_customize->add_control( + 'generate_settings[header_layout_setting]', + array( + 'type' => 'select', + 'label' => __( 'Header Width', 'generatepress' ), + 'section' => 'generate_layout_header', + 'choices' => array( + 'fluid-header' => __( 'Full', 'generatepress' ), + 'contained-header' => __( 'Contained', 'generatepress' ), + ), + 'settings' => 'generate_settings[header_layout_setting]', + 'priority' => 5, + ) + ); + + $wp_customize->add_setting( + 'generate_settings[header_inner_width]', + array( + 'default' => $defaults['header_inner_width'], + 'type' => 'option', + 'sanitize_callback' => 'generate_sanitize_choices', + 'transport' => 'postMessage', + ) + ); + + $wp_customize->add_control( + 'generate_settings[header_inner_width]', + array( + 'type' => 'select', + 'label' => __( 'Inner Header Width', 'generatepress' ), + 'section' => 'generate_layout_header', + 'choices' => array( + 'contained' => __( 'Contained', 'generatepress' ), + 'full-width' => __( 'Full', 'generatepress' ), + ), + 'settings' => 'generate_settings[header_inner_width]', + 'priority' => 6, + ) + ); + + $wp_customize->add_setting( + 'generate_settings[header_alignment_setting]', + array( + 'default' => $defaults['header_alignment_setting'], + 'type' => 'option', + 'sanitize_callback' => 'generate_sanitize_choices', + 'transport' => 'postMessage', + ) + ); + + $wp_customize->add_control( + 'generate_settings[header_alignment_setting]', + array( + 'type' => 'select', + 'label' => __( 'Header Alignment', 'generatepress' ), + 'section' => 'generate_layout_header', + 'choices' => array( + 'left' => __( 'Left', 'generatepress' ), + 'center' => __( 'Center', 'generatepress' ), + 'right' => __( 'Right', 'generatepress' ), + ), + 'settings' => 'generate_settings[header_alignment_setting]', + 'priority' => 10, + ) + ); + + $wp_customize->add_section( + 'generate_layout_navigation', + array( + 'title' => __( 'Primary Navigation', 'generatepress' ), + 'priority' => 30, + 'panel' => 'generate_layout_panel', + ) + ); + + $wp_customize->add_setting( + 'generate_settings[nav_layout_setting]', + array( + 'default' => $defaults['nav_layout_setting'], + 'type' => 'option', + 'sanitize_callback' => 'generate_sanitize_choices', + 'transport' => 'postMessage', + ) + ); + + $wp_customize->add_control( + 'generate_settings[nav_layout_setting]', + array( + 'type' => 'select', + 'label' => __( 'Navigation Width', 'generatepress' ), + 'section' => 'generate_layout_navigation', + 'choices' => array( + 'fluid-nav' => __( 'Full', 'generatepress' ), + 'contained-nav' => __( 'Contained', 'generatepress' ), + ), + 'settings' => 'generate_settings[nav_layout_setting]', + 'priority' => 15, + ) + ); + + $wp_customize->add_setting( + 'generate_settings[nav_inner_width]', + array( + 'default' => $defaults['nav_inner_width'], + 'type' => 'option', + 'sanitize_callback' => 'generate_sanitize_choices', + 'transport' => 'postMessage', + ) + ); + + $wp_customize->add_control( + 'generate_settings[nav_inner_width]', + array( + 'type' => 'select', + 'label' => __( 'Inner Navigation Width', 'generatepress' ), + 'section' => 'generate_layout_navigation', + 'choices' => array( + 'contained' => __( 'Contained', 'generatepress' ), + 'full-width' => __( 'Full', 'generatepress' ), + ), + 'settings' => 'generate_settings[nav_inner_width]', + 'priority' => 16, + ) + ); + + $wp_customize->add_setting( + 'generate_settings[nav_alignment_setting]', + array( + 'default' => $defaults['nav_alignment_setting'], + 'type' => 'option', + 'sanitize_callback' => 'generate_sanitize_choices', + 'transport' => 'postMessage', + ) + ); + + $wp_customize->add_control( + 'generate_settings[nav_alignment_setting]', + array( + 'type' => 'select', + 'label' => __( 'Navigation Alignment', 'generatepress' ), + 'section' => 'generate_layout_navigation', + 'choices' => array( + 'left' => __( 'Left', 'generatepress' ), + 'center' => __( 'Center', 'generatepress' ), + 'right' => __( 'Right', 'generatepress' ), + ), + 'settings' => 'generate_settings[nav_alignment_setting]', + 'priority' => 20, + ) + ); + + $wp_customize->add_setting( + 'generate_settings[nav_position_setting]', + array( + 'default' => $defaults['nav_position_setting'], + 'type' => 'option', + 'sanitize_callback' => 'generate_sanitize_choices', + 'transport' => 'refresh', + ) + ); + + $wp_customize->add_control( + 'generate_settings[nav_position_setting]', + array( + 'type' => 'select', + 'label' => __( 'Navigation Location', 'generatepress' ), + 'section' => 'generate_layout_navigation', + 'choices' => array( + 'nav-below-header' => __( 'Below Header', 'generatepress' ), + 'nav-above-header' => __( 'Above Header', 'generatepress' ), + 'nav-float-right' => __( 'Float Right', 'generatepress' ), + 'nav-float-left' => __( 'Float Left', 'generatepress' ), + 'nav-left-sidebar' => __( 'Left Sidebar', 'generatepress' ), + 'nav-right-sidebar' => __( 'Right Sidebar', 'generatepress' ), + '' => __( 'No Navigation', 'generatepress' ), + ), + 'settings' => 'generate_settings[nav_position_setting]', + 'priority' => 22, + ) + ); + + $wp_customize->add_setting( + 'generate_settings[nav_drop_point]', + array( + 'default' => $defaults['nav_drop_point'], + 'type' => 'option', + 'sanitize_callback' => 'generate_sanitize_empty_absint', + ) + ); + + $wp_customize->add_control( + new Generate_Range_Slider_Control( + $wp_customize, + 'generate_settings[nav_drop_point]', + array( + 'label' => __( 'Navigation Drop Point', 'generatepress' ), + 'sub_description' => __( 'The width when the navigation ceases to float and drops below your logo.', 'generatepress' ), + 'section' => 'generate_layout_navigation', + 'settings' => array( + 'desktop' => 'generate_settings[nav_drop_point]', + ), + 'choices' => array( + 'desktop' => array( + 'min' => 500, + 'max' => 2000, + 'step' => 10, + 'edit' => true, + 'unit' => 'px', + ), + ), + 'priority' => 22, + ) + ) + ); + + $wp_customize->add_setting( + 'generate_settings[nav_dropdown_type]', + array( + 'default' => $defaults['nav_dropdown_type'], + 'type' => 'option', + 'sanitize_callback' => 'generate_sanitize_choices', + ) + ); + + $wp_customize->add_control( + 'generate_settings[nav_dropdown_type]', + array( + 'type' => 'select', + 'label' => __( 'Navigation Dropdown', 'generatepress' ), + 'section' => 'generate_layout_navigation', + 'choices' => array( + 'hover' => __( 'Hover', 'generatepress' ), + 'click' => __( 'Click - Menu Item', 'generatepress' ), + 'click-arrow' => __( 'Click - Arrow', 'generatepress' ), + ), + 'settings' => 'generate_settings[nav_dropdown_type]', + 'priority' => 22, + ) + ); + + $wp_customize->add_setting( + 'generate_settings[nav_dropdown_direction]', + array( + 'default' => $defaults['nav_dropdown_direction'], + 'type' => 'option', + 'sanitize_callback' => 'generate_sanitize_choices', + ) + ); + + $wp_customize->add_control( + 'generate_settings[nav_dropdown_direction]', + array( + 'type' => 'select', + 'label' => __( 'Dropdown Direction', 'generatepress' ), + 'section' => 'generate_layout_navigation', + 'choices' => array( + 'right' => __( 'Right', 'generatepress' ), + 'left' => __( 'Left', 'generatepress' ), + ), + 'settings' => 'generate_settings[nav_dropdown_direction]', + 'priority' => 22, + ) + ); + + $wp_customize->add_setting( + 'generate_settings[nav_search]', + array( + 'default' => $defaults['nav_search'], + 'type' => 'option', + 'sanitize_callback' => 'generate_sanitize_choices', + ) + ); + + $wp_customize->add_control( + 'generate_settings[nav_search]', + array( + 'type' => 'select', + 'label' => __( 'Navigation Search', 'generatepress' ), + 'section' => 'generate_layout_navigation', + 'choices' => array( + 'enable' => __( 'Enable', 'generatepress' ), + 'disable' => __( 'Disable', 'generatepress' ), + ), + 'settings' => 'generate_settings[nav_search]', + 'priority' => 23, + ) + ); + + $wp_customize->add_setting( + 'generate_settings[content_layout_setting]', + array( + 'default' => $defaults['content_layout_setting'], + 'type' => 'option', + 'sanitize_callback' => 'generate_sanitize_choices', + ) + ); + + $wp_customize->add_control( + 'generate_settings[content_layout_setting]', + array( + 'type' => 'select', + 'label' => __( 'Content Layout', 'generatepress' ), + 'section' => 'generate_layout_container', + 'choices' => array( + 'separate-containers' => __( 'Separate Containers', 'generatepress' ), + 'one-container' => __( 'One Container', 'generatepress' ), + ), + 'settings' => 'generate_settings[content_layout_setting]', + 'priority' => 25, + ) + ); + + $wp_customize->add_setting( + 'generate_settings[container_alignment]', + array( + 'default' => $defaults['container_alignment'], + 'type' => 'option', + 'sanitize_callback' => 'generate_sanitize_choices', + ) + ); + + $wp_customize->add_control( + 'generate_settings[container_alignment]', + array( + 'type' => 'select', + 'label' => __( 'Container Alignment', 'generatepress' ), + 'section' => 'generate_layout_container', + 'choices' => array( + 'boxes' => __( 'Boxes', 'generatepress' ), + 'text' => __( 'Text', 'generatepress' ), + ), + 'settings' => 'generate_settings[container_alignment]', + 'priority' => 30, + ) + ); + + $wp_customize->add_section( + 'generate_layout_sidebars', + array( + 'title' => __( 'Sidebars', 'generatepress' ), + 'priority' => 40, + 'panel' => 'generate_layout_panel', + ) + ); + + $wp_customize->add_setting( + 'generate_settings[layout_setting]', + array( + 'default' => $defaults['layout_setting'], + 'type' => 'option', + 'sanitize_callback' => 'generate_sanitize_choices', + ) + ); + + $wp_customize->add_control( + 'generate_settings[layout_setting]', + array( + 'type' => 'select', + 'label' => __( 'Sidebar Layout', 'generatepress' ), + 'section' => 'generate_layout_sidebars', + 'choices' => array( + 'left-sidebar' => __( 'Sidebar / Content', 'generatepress' ), + 'right-sidebar' => __( 'Content / Sidebar', 'generatepress' ), + 'no-sidebar' => __( 'Content (no sidebars)', 'generatepress' ), + 'both-sidebars' => __( 'Sidebar / Content / Sidebar', 'generatepress' ), + 'both-left' => __( 'Sidebar / Sidebar / Content', 'generatepress' ), + 'both-right' => __( 'Content / Sidebar / Sidebar', 'generatepress' ), + ), + 'settings' => 'generate_settings[layout_setting]', + 'priority' => 30, + ) + ); + + $wp_customize->add_setting( + 'generate_settings[blog_layout_setting]', + array( + 'default' => $defaults['blog_layout_setting'], + 'type' => 'option', + 'sanitize_callback' => 'generate_sanitize_choices', + ) + ); + + $wp_customize->add_control( + 'generate_settings[blog_layout_setting]', + array( + 'type' => 'select', + 'label' => __( 'Blog Sidebar Layout', 'generatepress' ), + 'section' => 'generate_layout_sidebars', + 'choices' => array( + 'left-sidebar' => __( 'Sidebar / Content', 'generatepress' ), + 'right-sidebar' => __( 'Content / Sidebar', 'generatepress' ), + 'no-sidebar' => __( 'Content (no sidebars)', 'generatepress' ), + 'both-sidebars' => __( 'Sidebar / Content / Sidebar', 'generatepress' ), + 'both-left' => __( 'Sidebar / Sidebar / Content', 'generatepress' ), + 'both-right' => __( 'Content / Sidebar / Sidebar', 'generatepress' ), + ), + 'settings' => 'generate_settings[blog_layout_setting]', + 'priority' => 35, + ) + ); + + $wp_customize->add_setting( + 'generate_settings[single_layout_setting]', + array( + 'default' => $defaults['single_layout_setting'], + 'type' => 'option', + 'sanitize_callback' => 'generate_sanitize_choices', + ) + ); + + $wp_customize->add_control( + 'generate_settings[single_layout_setting]', + array( + 'type' => 'select', + 'label' => __( 'Single Post Sidebar Layout', 'generatepress' ), + 'section' => 'generate_layout_sidebars', + 'choices' => array( + 'left-sidebar' => __( 'Sidebar / Content', 'generatepress' ), + 'right-sidebar' => __( 'Content / Sidebar', 'generatepress' ), + 'no-sidebar' => __( 'Content (no sidebars)', 'generatepress' ), + 'both-sidebars' => __( 'Sidebar / Content / Sidebar', 'generatepress' ), + 'both-left' => __( 'Sidebar / Sidebar / Content', 'generatepress' ), + 'both-right' => __( 'Content / Sidebar / Sidebar', 'generatepress' ), + ), + 'settings' => 'generate_settings[single_layout_setting]', + 'priority' => 36, + ) + ); + + $wp_customize->add_section( + 'generate_layout_footer', + array( + 'title' => __( 'Footer', 'generatepress' ), + 'priority' => 50, + 'panel' => 'generate_layout_panel', + ) + ); + + $wp_customize->add_setting( + 'generate_settings[footer_layout_setting]', + array( + 'default' => $defaults['footer_layout_setting'], + 'type' => 'option', + 'sanitize_callback' => 'generate_sanitize_choices', + 'transport' => 'postMessage', + ) + ); + + $wp_customize->add_control( + 'generate_settings[footer_layout_setting]', + array( + 'type' => 'select', + 'label' => __( 'Footer Width', 'generatepress' ), + 'section' => 'generate_layout_footer', + 'choices' => array( + 'fluid-footer' => __( 'Full', 'generatepress' ), + 'contained-footer' => __( 'Contained', 'generatepress' ), + ), + 'settings' => 'generate_settings[footer_layout_setting]', + 'priority' => 40, + ) + ); + + $wp_customize->add_setting( + 'generate_settings[footer_inner_width]', + array( + 'default' => $defaults['footer_inner_width'], + 'type' => 'option', + 'sanitize_callback' => 'generate_sanitize_choices', + 'transport' => 'postMessage', + ) + ); + + $wp_customize->add_control( + 'generate_settings[footer_inner_width]', + array( + 'type' => 'select', + 'label' => __( 'Inner Footer Width', 'generatepress' ), + 'section' => 'generate_layout_footer', + 'choices' => array( + 'contained' => __( 'Contained', 'generatepress' ), + 'full-width' => __( 'Full', 'generatepress' ), + ), + 'settings' => 'generate_settings[footer_inner_width]', + 'priority' => 41, + ) + ); + + $wp_customize->add_setting( + 'generate_settings[footer_widget_setting]', + array( + 'default' => $defaults['footer_widget_setting'], + 'type' => 'option', + 'sanitize_callback' => 'generate_sanitize_choices', + ) + ); + + $wp_customize->add_control( + 'generate_settings[footer_widget_setting]', + array( + 'type' => 'select', + 'label' => __( 'Footer Widgets', 'generatepress' ), + 'section' => 'generate_layout_footer', + 'choices' => array( + '0' => '0', + '1' => '1', + '2' => '2', + '3' => '3', + '4' => '4', + '5' => '5', + ), + 'settings' => 'generate_settings[footer_widget_setting]', + 'priority' => 45, + ) + ); + + $wp_customize->add_setting( + 'generate_settings[footer_bar_alignment]', + array( + 'default' => $defaults['footer_bar_alignment'], + 'type' => 'option', + 'sanitize_callback' => 'generate_sanitize_choices', + 'transport' => 'postMessage', + ) + ); + + $wp_customize->add_control( + 'generate_settings[footer_bar_alignment]', + array( + 'type' => 'select', + 'label' => __( 'Footer Bar Alignment', 'generatepress' ), + 'section' => 'generate_layout_footer', + 'choices' => array( + 'left' => __( 'Left', 'generatepress' ), + 'center' => __( 'Center', 'generatepress' ), + 'right' => __( 'Right', 'generatepress' ), + ), + 'settings' => 'generate_settings[footer_bar_alignment]', + 'priority' => 47, + 'active_callback' => 'generate_is_footer_bar_active', + ) + ); + + $wp_customize->add_setting( + 'generate_settings[back_to_top]', + array( + 'default' => $defaults['back_to_top'], + 'type' => 'option', + 'sanitize_callback' => 'generate_sanitize_choices', + ) + ); + + $wp_customize->add_control( + 'generate_settings[back_to_top]', + array( + 'type' => 'select', + 'label' => __( 'Back to Top Button', 'generatepress' ), + 'section' => 'generate_layout_footer', + 'choices' => array( + 'enable' => __( 'Enable', 'generatepress' ), + '' => __( 'Disable', 'generatepress' ), + ), + 'settings' => 'generate_settings[back_to_top]', + 'priority' => 50, + ) + ); + + $wp_customize->add_section( + 'generate_blog_section', + array( + 'title' => __( 'Blog', 'generatepress' ), + 'priority' => 55, + 'panel' => 'generate_layout_panel', + ) + ); + + $wp_customize->add_setting( + 'generate_settings[post_content]', + array( + 'default' => $defaults['post_content'], + 'type' => 'option', + 'sanitize_callback' => 'generate_sanitize_blog_excerpt', + ) + ); + + $wp_customize->add_control( + 'blog_content_control', + array( + 'type' => 'select', + 'label' => __( 'Content Type', 'generatepress' ), + 'section' => 'generate_blog_section', + 'choices' => array( + 'full' => __( 'Full Content', 'generatepress' ), + 'excerpt' => __( 'Excerpt', 'generatepress' ), + ), + 'settings' => 'generate_settings[post_content]', + 'priority' => 10, + ) + ); + + if ( ! function_exists( 'generate_blog_customize_register' ) && ! defined( 'GP_PREMIUM_VERSION' ) ) { + $wp_customize->add_control( + new Generate_Customize_Misc_Control( + $wp_customize, + 'blog_get_addon_desc', + array( + 'section' => 'generate_blog_section', + 'type' => 'addon', + 'label' => __( 'Learn more', 'generatepress' ), + 'description' => __( 'More options are available for this section in our premium version.', 'generatepress' ), + 'url' => generate_get_premium_url( 'https://generatepress.com/premium/#blog', false ), + 'priority' => 30, + 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', + ) + ) + ); + } + + $wp_customize->add_section( + 'generate_general_section', + array( + 'title' => __( 'General', 'generatepress' ), + 'priority' => 99, + ) + ); + + if ( ! apply_filters( 'generate_fontawesome_essentials', false ) ) { + $wp_customize->add_setting( + 'generate_settings[font_awesome_essentials]', + array( + 'default' => $defaults['font_awesome_essentials'], + 'type' => 'option', + 'sanitize_callback' => 'generate_sanitize_checkbox', + ) + ); + + $wp_customize->add_control( + 'generate_settings[font_awesome_essentials]', + array( + 'type' => 'checkbox', + 'label' => __( 'Load essential icons only', 'generatepress' ), + 'description' => __( 'Load essential Font Awesome icons instead of the full library.', 'generatepress' ), + 'section' => 'generate_general_section', + 'settings' => 'generate_settings[font_awesome_essentials]', + ) + ); + } + + $show_flexbox_option = true; + + if ( defined( 'GP_PREMIUM_VERSION' ) && version_compare( GP_PREMIUM_VERSION, '1.11.0-alpha.1', '<' ) ) { + $show_flexbox_option = false; + } + + if ( generate_is_using_flexbox() ) { + $show_flexbox_option = true; + } + + $show_flexbox_option = apply_filters( 'generate_show_flexbox_customizer_option', $show_flexbox_option ); + + if ( $show_flexbox_option ) { + $wp_customize->add_setting( + 'generate_settings[structure]', + array( + 'default' => $defaults['structure'], + 'type' => 'option', + 'sanitize_callback' => 'generate_sanitize_choices', + ) + ); + + $wp_customize->add_control( + 'generate_settings[structure]', + array( + 'type' => 'select', + 'label' => __( 'Structure', 'generatepress' ), + 'section' => 'generate_general_section', + 'choices' => array( + 'flexbox' => __( 'Flexbox', 'generatepress' ), + 'floats' => __( 'Floats', 'generatepress' ), + ), + 'description' => sprintf( + '%1$s %2$s', + __( 'Caution:', 'generatepress' ), + sprintf( + /* translators: Learn more here */ + __( 'Switching your structure can change how your website displays. Review your website thoroughly before publishing this change, or use a staging site to review the potential changes. Learn more %s.', 'generatepress' ), + '' . __( 'here', 'generatepress' ) . '' + ) + ), + 'settings' => 'generate_settings[structure]', + ) + ); + } + + $wp_customize->add_setting( + 'generate_settings[icons]', + array( + 'default' => $defaults['icons'], + 'type' => 'option', + 'sanitize_callback' => 'generate_sanitize_choices', + ) + ); + + $wp_customize->add_control( + 'generate_settings[icons]', + array( + 'type' => 'select', + 'label' => __( 'Icon Type', 'generatepress' ), + 'section' => 'generate_general_section', + 'choices' => array( + 'svg' => __( 'SVG', 'generatepress' ), + 'font' => __( 'Font', 'generatepress' ), + ), + 'settings' => 'generate_settings[icons]', + ) + ); + + $wp_customize->add_setting( + 'generate_settings[combine_css]', + array( + 'default' => $defaults['combine_css'], + 'type' => 'option', + 'sanitize_callback' => 'generate_sanitize_checkbox', + ) + ); + + $wp_customize->add_control( + 'generate_settings[combine_css]', + array( + 'type' => 'checkbox', + 'label' => __( 'Combine CSS', 'generatepress' ), + 'description' => __( 'Reduce the number of CSS file requests and use a lite version of our grid system.', 'generatepress' ), + 'section' => 'generate_general_section', + 'active_callback' => 'generate_is_using_floats_callback', + ) + ); + + $wp_customize->add_setting( + 'generate_settings[dynamic_css_cache]', + array( + 'default' => $defaults['dynamic_css_cache'], + 'type' => 'option', + 'sanitize_callback' => 'generate_sanitize_checkbox', + ) + ); + + $wp_customize->add_control( + 'generate_settings[dynamic_css_cache]', + array( + 'type' => 'checkbox', + 'label' => __( 'Cache dynamic CSS', 'generatepress' ), + 'description' => __( 'Cache CSS generated by your options to boost performance.', 'generatepress' ), + 'section' => 'generate_general_section', + ) + ); + } +} diff --git a/wp-content/themes/generatepress/inc/customizer/controls/js/customizer-controls.js b/wp-content/themes/generatepress/inc/customizer/controls/js/customizer-controls.js index cdf56097..d1c783ec 100644 --- a/wp-content/themes/generatepress/inc/customizer/controls/js/customizer-controls.js +++ b/wp-content/themes/generatepress/inc/customizer/controls/js/customizer-controls.js @@ -1,501 +1,501 @@ -( function( api ) { - 'use strict'; - - // Add callback for when the header_textcolor setting exists. - api( 'generate_settings[nav_position_setting]', function( setting ) { - var isNavFloated, isNavAlignable, setNavDropPointActiveState, setNavAlignmentsActiveState; - - /** - * Determine whether the navigation is floating. - * - * @returns {boolean} Is floating? - */ - isNavFloated = function() { - if ( 'nav-float-right' === setting.get() || 'nav-float-left' === setting.get() ) { - return true; - } - - return false; - }; - - /** - * Determine whether the navigation is align-able. - * - * @returns {boolean} Is floating? - */ - isNavAlignable = function() { - if ( 'nav-float-right' === setting.get() || 'nav-float-left' === setting.get() ) { - var navAsHeader = api.instance( 'generate_menu_plus_settings[navigation_as_header]' ); - - if ( navAsHeader && navAsHeader.get() ) { - return true; - } - - return false; - } - - return true; - }; - - /** - * Update a control's active state according to the navigation location setting's value. - * - * @param {wp.customize.Control} control - */ - setNavDropPointActiveState = function( control ) { - var setActiveState = function() { - control.active.set( isNavFloated() ); - }; - - // FYI: With the following we can eliminate all of our PHP active_callback code. - control.active.validate = isNavFloated; - - // Set initial active state. - setActiveState(); - - /* - * Update activate state whenever the setting is changed. - * Even when the setting does have a refresh transport where the - * server-side active callback will manage the active state upon - * refresh, having this JS management of the active state will - * ensure that controls will have their visibility toggled - * immediately instead of waiting for the preview to load. - * This is especially important if the setting has a postMessage - * transport where changing the setting wouldn't normally cause - * the preview to refresh and thus the server-side active_callbacks - * would not get invoked. - */ - setting.bind( setActiveState ); - }; - - /** - * Update a control's active state according to the navigation location setting's value. - * - * @param {wp.customize.Control} control - */ - setNavAlignmentsActiveState = function( control ) { - var setActiveState = function() { - control.active.set( isNavAlignable() ); - }; - - // FYI: With the following we can eliminate all of our PHP active_callback code. - control.active.validate = isNavAlignable; - - // Set initial active state. - setActiveState(); - - /* - * Update activate state whenever the setting is changed. - * Even when the setting does have a refresh transport where the - * server-side active callback will manage the active state upon - * refresh, having this JS management of the active state will - * ensure that controls will have their visibility toggled - * immediately instead of waiting for the preview to load. - * This is especially important if the setting has a postMessage - * transport where changing the setting wouldn't normally cause - * the preview to refresh and thus the server-side active_callbacks - * would not get invoked. - */ - setting.bind( setActiveState ); - }; - - api.control( 'generate_settings[nav_drop_point]', setNavDropPointActiveState ); - api.control( 'generate_settings[nav_layout_setting]', setNavAlignmentsActiveState ); - api.control( 'generate_settings[nav_inner_width]', setNavAlignmentsActiveState ); - api.control( 'generate_settings[nav_alignment_setting]', setNavAlignmentsActiveState ); - } ); - - var setOption = function( options ) { - if ( options.headerAlignment ) { - api.instance( 'generate_settings[header_alignment_setting]' ).set( options.headerAlignment ); - } - - if ( options.navLocation ) { - api.instance( 'generate_settings[nav_position_setting]' ).set( options.navLocation ); - } - - if ( options.navAlignment ) { - api.instance( 'generate_settings[nav_alignment_setting]' ).set( options.navAlignment ); - } - - if ( options.boxAlignment ) { - api.instance( 'generate_settings[container_alignment]' ).set( options.boxAlignment ); - } - - if ( options.siteTitleFontSize ) { - api.instance( 'generate_settings[site_title_font_size]' ).set( options.siteTitleFontSize ); - } - - if ( 'undefined' !== typeof options.hideSiteTagline ) { - api.instance( 'generate_settings[hide_tagline]' ).set( options.hideSiteTagline ); - } - - if ( options.headerPaddingTop ) { - api.instance( 'generate_spacing_settings[header_top]' ).set( options.headerPaddingTop ); - } - - if ( options.headerPaddingBottom ) { - api.instance( 'generate_spacing_settings[header_bottom]' ).set( options.headerPaddingBottom ); - } - }; - - api( 'generate_header_helper', function( value ) { - var headerAlignment = false, - navLocation = false, - navAlignment = false, - boxAlignment = false, - siteTitleFontSize = false, - hideSiteTagline = false, - headerPaddingTop = false, - headerPaddingBottom = false; - - value.bind( function( newval ) { - var headerAlignmentSetting = api.instance( 'generate_settings[header_alignment_setting]' ); - var navLocationSetting = api.instance( 'generate_settings[nav_position_setting]' ); - var navAlignmentSetting = api.instance( 'generate_settings[nav_alignment_setting]' ); - var boxAlignmentSetting = api.instance( 'generate_settings[container_alignment]' ); - var siteTitleFontSizeSetting = api.instance( 'generate_settings[site_title_font_size]' ); - var hideSiteTaglineSetting = api.instance( 'generate_settings[hide_tagline]' ); - var headerPaddingTopSetting = api.instance( 'generate_spacing_settings[header_top]' ); - var headerPaddingBottomSetting = api.instance( 'generate_spacing_settings[header_bottom]' ); - - if ( ! headerAlignmentSetting._dirty ) { - headerAlignment = headerAlignmentSetting.get(); - } - - if ( ! navLocationSetting._dirty ) { - navLocation = navLocationSetting.get(); - } - - if ( ! navAlignmentSetting._dirty ) { - navAlignment = navAlignmentSetting.get(); - } - - if ( ! boxAlignmentSetting._dirty ) { - boxAlignment = boxAlignmentSetting.get(); - } - - if ( ! siteTitleFontSizeSetting._dirty ) { - siteTitleFontSize = siteTitleFontSizeSetting.get(); - } - - if ( ! hideSiteTaglineSetting._dirty ) { - hideSiteTagline = hideSiteTaglineSetting.get(); - } - - if ( ! headerPaddingTopSetting._dirty ) { - headerPaddingTop = headerPaddingTopSetting.get(); - } - - if ( ! headerPaddingBottomSetting._dirty ) { - headerPaddingBottom = headerPaddingBottomSetting.get(); - } - - var options = { - headerAlignment: generatepress_defaults.header_alignment_setting, - navLocation: generatepress_defaults.nav_position_setting, - navAlignment: generatepress_defaults.nav_alignment_setting, - boxAlignment: generatepress_defaults.container_alignment, - siteTitleFontSize: generatepress_typography_defaults.site_title_font_size, - hideSiteTagline: generatepress_defaults.hide_tagline, - headerPaddingTop: generatepress_spacing_defaults.header_top, - headerPaddingBottom: generatepress_spacing_defaults.header_bottom, - }; - - if ( 'current' === newval ) { - options = { - headerAlignment: headerAlignment, - navLocation: navLocation, - navAlignment: navAlignment, - boxAlignment: boxAlignment, - siteTitleFontSize: siteTitleFontSize, - hideSiteTagline: hideSiteTagline, - headerPaddingTop: headerPaddingTop, - headerPaddingBottom: headerPaddingBottom, - }; - - setOption( options ); - } - - if ( 'default' === newval ) { - setOption( options ); - } - - if ( 'classic' === newval ) { - var options = { - headerAlignment: 'left', - navLocation: 'nav-below-header', - navAlignment: 'left', - boxAlignment: 'boxes', - siteTitleFontSize: '45', - hideSiteTagline: '', - headerPaddingTop: '40', - headerPaddingBottom: '40', - }; - - setOption( options ); - } - - if ( 'nav-before' === newval ) { - options['headerAlignment'] = 'left'; - options['navLocation'] = 'nav-above-header'; - options['navAlignment'] = 'left'; - - setOption( options ); - } - - if ( 'nav-after' === newval ) { - options['headerAlignment'] = 'left'; - options['navLocation'] = 'nav-below-header'; - options['navAlignment'] = 'left'; - - setOption( options ); - } - - if ( 'nav-before-centered' === newval ) { - options['headerAlignment'] = 'center'; - options['navLocation'] = 'nav-above-header'; - options['navAlignment'] = 'center'; - - setOption( options ); - } - - if ( 'nav-after-centered' === newval ) { - options['headerAlignment'] = 'center'; - options['navLocation'] = 'nav-below-header'; - options['navAlignment'] = 'center'; - - setOption( options ); - } - - if ( 'nav-left' === newval ) { - options['headerAlignment'] = 'left'; - options['navLocation'] = 'nav-float-left'; - options['navAlignment'] = 'right'; - - setOption( options ); - } - } ); - } ); - - api( 'nav_color_presets', function( value ) { - var backgroundColor = false, - textColor = false, - backgroundColorHover = false, - textColorHover = false, - currentBackgroundColor = false, - currentTextColor = false, - subMenuBackgroundColor = false, - subMenuTextColor = false, - subMenuBackgroundColorHover = false, - subMenuTextColorHover = false, - subMenuCurrentBackgroundColor = false, - subMenuCurrentTextColor = false; - - value.bind( function( newval ) { - var backgroundColorSetting = api.instance( 'generate_settings[navigation_background_color]' ), - textColorSetting = api.instance( 'generate_settings[navigation_text_color]' ), - backgroundColorHoverSetting = api.instance( 'generate_settings[navigation_background_hover_color]' ), - textColorHoverSetting = api.instance( 'generate_settings[navigation_text_hover_color]' ), - currentBackgroundColorSetting = api.instance( 'generate_settings[navigation_background_current_color]' ), - currentTextColorSetting = api.instance( 'generate_settings[navigation_text_current_color]' ), - subMenuBackgroundColorSetting = api.instance( 'generate_settings[subnavigation_background_color]' ), - subMenuTextColorSetting = api.instance( 'generate_settings[subnavigation_text_color]' ), - subMenuBackgroundColorHoverSetting = api.instance( 'generate_settings[subnavigation_background_hover_color]' ), - subMenuTextColorHoverSetting = api.instance( 'generate_settings[subnavigation_text_hover_color]' ), - subMenuCurrentBackgroundColorSetting = api.instance( 'generate_settings[subnavigation_background_current_color]' ), - subMenuCurrentTextColorSetting = api.instance( 'generate_settings[subnavigation_text_current_color]' ); - - if ( ! backgroundColorSetting._dirty ) { - backgroundColor = backgroundColorSetting.get(); - } - - if ( ! textColorSetting._dirty ) { - textColor = textColorSetting.get(); - } - - if ( ! backgroundColorHoverSetting._dirty ) { - backgroundColorHover = backgroundColorHoverSetting.get(); - } - - if ( ! textColorHoverSetting._dirty ) { - textColorHover = textColorHoverSetting.get(); - } - - if ( ! currentBackgroundColorSetting._dirty ) { - currentBackgroundColor = currentBackgroundColorSetting.get(); - } - - if ( ! currentTextColorSetting._dirty ) { - currentTextColor = currentTextColorSetting.get(); - } - - if ( ! subMenuBackgroundColorSetting._dirty ) { - subMenuBackgroundColor = subMenuBackgroundColorSetting.get(); - } - - if ( ! subMenuTextColorSetting._dirty ) { - subMenuTextColor = subMenuTextColorSetting.get(); - } - - if ( ! subMenuBackgroundColorHoverSetting._dirty ) { - subMenuBackgroundColorHover = subMenuBackgroundColorHoverSetting.get(); - } - - if ( ! subMenuTextColorHoverSetting._dirty ) { - subMenuTextColorHover = subMenuTextColorHoverSetting.get(); - } - - if ( ! subMenuCurrentBackgroundColorSetting._dirty ) { - subMenuCurrentBackgroundColor = subMenuCurrentBackgroundColorSetting.get(); - } - - if ( ! subMenuCurrentTextColorSetting._dirty ) { - subMenuCurrentTextColor = subMenuCurrentTextColorSetting.get(); - } - - if ( 'current' === newval ) { - backgroundColorSetting.set( backgroundColor ); - textColorSetting.set( textColor ); - - backgroundColorHoverSetting.set( backgroundColorHover ); - textColorHoverSetting.set( textColorHover ); - - currentBackgroundColorSetting.set( currentBackgroundColor ); - currentTextColorSetting.set( currentTextColorSetting ); - - subMenuBackgroundColorSetting.set( subMenuBackgroundColor ); - subMenuTextColorSetting.set( subMenuTextColor ); - - subMenuBackgroundColorHoverSetting.set( subMenuBackgroundColorHover ); - subMenuTextColorHoverSetting.set( subMenuTextColorHover ); - - subMenuCurrentBackgroundColorSetting.set( subMenuCurrentBackgroundColor ); - subMenuCurrentTextColorSetting.set( subMenuCurrentTextColorSetting ); - } - - if ( 'default' === newval ) { - backgroundColorSetting.set( generatepress_color_defaults.navigation_background_color ); - textColorSetting.set( generatepress_color_defaults.navigation_text_color ); - - backgroundColorHoverSetting.set( generatepress_color_defaults.navigation_background_hover_color ); - textColorHoverSetting.set( generatepress_color_defaults.navigation_text_hover_color ); - - currentBackgroundColorSetting.set( generatepress_color_defaults.navigation_background_current_color ); - currentTextColorSetting.set( generatepress_color_defaults.navigation_text_current_color ); - - subMenuBackgroundColorSetting.set( generatepress_color_defaults.subnavigation_background_color ); - subMenuTextColorSetting.set( generatepress_color_defaults.subnavigation_text_color ); - - subMenuBackgroundColorHoverSetting.set( generatepress_color_defaults.subnavigation_background_hover_color ); - subMenuTextColorHoverSetting.set( generatepress_color_defaults.subnavigation_text_hover_color ); - - subMenuCurrentBackgroundColorSetting.set( generatepress_color_defaults.subnavigation_background_current_color ); - subMenuCurrentTextColorSetting.set( generatepress_color_defaults.subnavigation_text_current_color ); - } - - if ( 'classic' === newval ) { - backgroundColorSetting.set( '#222222' ); - textColorSetting.set( '#ffffff' ); - - backgroundColorHoverSetting.set( '#3f3f3f' ); - textColorHoverSetting.set( '#ffffff' ); - - currentBackgroundColorSetting.set( '#3f3f3f' ); - currentTextColorSetting.set( '#ffffff' ); - - subMenuBackgroundColorSetting.set( '#3f3f3f' ); - subMenuTextColorSetting.set( '#ffffff' ); - - subMenuBackgroundColorHoverSetting.set( '#4f4f4f' ); - subMenuTextColorHoverSetting.set( '#ffffff' ); - - subMenuCurrentBackgroundColorSetting.set( '#4f4f4f' ); - subMenuCurrentTextColorSetting.set( '#ffffff' ); - } - - if ( 'grey' === newval ) { - backgroundColorSetting.set( '#595959' ); - textColorSetting.set( '#ffffff' ); - - backgroundColorHoverSetting.set( '#424242' ); - textColorHoverSetting.set( '#ffffff' ); - - currentBackgroundColorSetting.set( '#424242' ); - currentTextColorSetting.set( '#ffffff' ); - - subMenuBackgroundColorSetting.set( '#424242' ); - subMenuTextColorSetting.set( '#ffffff' ); - - subMenuBackgroundColorHoverSetting.set( '#424242' ); - subMenuTextColorHoverSetting.set( '#dbdbdb' ); - - subMenuCurrentBackgroundColorSetting.set( '#424242' ); - subMenuCurrentTextColorSetting.set( '#dbdbdb' ); - } - - if ( 'blue' === newval ) { - backgroundColorSetting.set( '#1e73be' ); - textColorSetting.set( '#ffffff' ); - - backgroundColorHoverSetting.set( '#035a9e' ); - textColorHoverSetting.set( '#ffffff' ); - - currentBackgroundColorSetting.set( '#035a9e' ); - currentTextColorSetting.set( '#ffffff' ); - - subMenuBackgroundColorSetting.set( '#035a9e' ); - subMenuTextColorSetting.set( '#ffffff' ); - - subMenuBackgroundColorHoverSetting.set( '#035a9e' ); - subMenuTextColorHoverSetting.set( '#bbd2e8' ); - - subMenuCurrentBackgroundColorSetting.set( '#035a9e' ); - subMenuCurrentTextColorSetting.set( '#bbd2e8' ); - } - - if ( 'red' === newval ) { - backgroundColorSetting.set( '#ed4250' ); - textColorSetting.set( '#ffffff' ); - - backgroundColorHoverSetting.set( '#c42f2f' ); - textColorHoverSetting.set( '#ffffff' ); - - currentBackgroundColorSetting.set( '#c42f2f' ); - currentTextColorSetting.set( '#ffffff' ); - - subMenuBackgroundColorSetting.set( '#c42f2f' ); - subMenuTextColorSetting.set( '#ffffff' ); - - subMenuBackgroundColorHoverSetting.set( '#c42f2f' ); - subMenuTextColorHoverSetting.set( '#fcd9d6' ); - - subMenuCurrentBackgroundColorSetting.set( '#c42f2f' ); - subMenuCurrentTextColorSetting.set( '#fcd9d6' ); - } - - if ( 'green' === newval ) { - backgroundColorSetting.set( '#16aa74' ); - textColorSetting.set( '#ffffff' ); - - backgroundColorHoverSetting.set( '#119b6d' ); - textColorHoverSetting.set( '#ffffff' ); - - currentBackgroundColorSetting.set( '#119b6d' ); - currentTextColorSetting.set( '#ffffff' ); - - subMenuBackgroundColorSetting.set( '#119b6d' ); - subMenuTextColorSetting.set( '#ffffff' ); - - subMenuBackgroundColorHoverSetting.set( '#119b6d' ); - subMenuTextColorHoverSetting.set( '#c2e8de' ); - - subMenuCurrentBackgroundColorSetting.set( '#119b6d' ); - subMenuCurrentTextColorSetting.set( '#c2e8de' ); - } - - jQuery('.wp-color-picker').wpColorPicker().change(); - } ); - } ); - -}( wp.customize ) ); +( function( api ) { + 'use strict'; + + // Add callback for when the header_textcolor setting exists. + api( 'generate_settings[nav_position_setting]', function( setting ) { + var isNavFloated, isNavAlignable, setNavDropPointActiveState, setNavAlignmentsActiveState; + + /** + * Determine whether the navigation is floating. + * + * @returns {boolean} Is floating? + */ + isNavFloated = function() { + if ( 'nav-float-right' === setting.get() || 'nav-float-left' === setting.get() ) { + return true; + } + + return false; + }; + + /** + * Determine whether the navigation is align-able. + * + * @returns {boolean} Is floating? + */ + isNavAlignable = function() { + if ( 'nav-float-right' === setting.get() || 'nav-float-left' === setting.get() ) { + var navAsHeader = api.instance( 'generate_menu_plus_settings[navigation_as_header]' ); + + if ( navAsHeader && navAsHeader.get() ) { + return true; + } + + return false; + } + + return true; + }; + + /** + * Update a control's active state according to the navigation location setting's value. + * + * @param {wp.customize.Control} control + */ + setNavDropPointActiveState = function( control ) { + var setActiveState = function() { + control.active.set( isNavFloated() ); + }; + + // FYI: With the following we can eliminate all of our PHP active_callback code. + control.active.validate = isNavFloated; + + // Set initial active state. + setActiveState(); + + /* + * Update activate state whenever the setting is changed. + * Even when the setting does have a refresh transport where the + * server-side active callback will manage the active state upon + * refresh, having this JS management of the active state will + * ensure that controls will have their visibility toggled + * immediately instead of waiting for the preview to load. + * This is especially important if the setting has a postMessage + * transport where changing the setting wouldn't normally cause + * the preview to refresh and thus the server-side active_callbacks + * would not get invoked. + */ + setting.bind( setActiveState ); + }; + + /** + * Update a control's active state according to the navigation location setting's value. + * + * @param {wp.customize.Control} control + */ + setNavAlignmentsActiveState = function( control ) { + var setActiveState = function() { + control.active.set( isNavAlignable() ); + }; + + // FYI: With the following we can eliminate all of our PHP active_callback code. + control.active.validate = isNavAlignable; + + // Set initial active state. + setActiveState(); + + /* + * Update activate state whenever the setting is changed. + * Even when the setting does have a refresh transport where the + * server-side active callback will manage the active state upon + * refresh, having this JS management of the active state will + * ensure that controls will have their visibility toggled + * immediately instead of waiting for the preview to load. + * This is especially important if the setting has a postMessage + * transport where changing the setting wouldn't normally cause + * the preview to refresh and thus the server-side active_callbacks + * would not get invoked. + */ + setting.bind( setActiveState ); + }; + + api.control( 'generate_settings[nav_drop_point]', setNavDropPointActiveState ); + api.control( 'generate_settings[nav_layout_setting]', setNavAlignmentsActiveState ); + api.control( 'generate_settings[nav_inner_width]', setNavAlignmentsActiveState ); + api.control( 'generate_settings[nav_alignment_setting]', setNavAlignmentsActiveState ); + } ); + + var setOption = function( options ) { + if ( options.headerAlignment ) { + api.instance( 'generate_settings[header_alignment_setting]' ).set( options.headerAlignment ); + } + + if ( options.navLocation ) { + api.instance( 'generate_settings[nav_position_setting]' ).set( options.navLocation ); + } + + if ( options.navAlignment ) { + api.instance( 'generate_settings[nav_alignment_setting]' ).set( options.navAlignment ); + } + + if ( options.boxAlignment ) { + api.instance( 'generate_settings[container_alignment]' ).set( options.boxAlignment ); + } + + if ( options.siteTitleFontSize ) { + api.instance( 'generate_settings[site_title_font_size]' ).set( options.siteTitleFontSize ); + } + + if ( 'undefined' !== typeof options.hideSiteTagline ) { + api.instance( 'generate_settings[hide_tagline]' ).set( options.hideSiteTagline ); + } + + if ( options.headerPaddingTop ) { + api.instance( 'generate_spacing_settings[header_top]' ).set( options.headerPaddingTop ); + } + + if ( options.headerPaddingBottom ) { + api.instance( 'generate_spacing_settings[header_bottom]' ).set( options.headerPaddingBottom ); + } + }; + + api( 'generate_header_helper', function( value ) { + var headerAlignment = false, + navLocation = false, + navAlignment = false, + boxAlignment = false, + siteTitleFontSize = false, + hideSiteTagline = false, + headerPaddingTop = false, + headerPaddingBottom = false; + + value.bind( function( newval ) { + var headerAlignmentSetting = api.instance( 'generate_settings[header_alignment_setting]' ); + var navLocationSetting = api.instance( 'generate_settings[nav_position_setting]' ); + var navAlignmentSetting = api.instance( 'generate_settings[nav_alignment_setting]' ); + var boxAlignmentSetting = api.instance( 'generate_settings[container_alignment]' ); + var siteTitleFontSizeSetting = api.instance( 'generate_settings[site_title_font_size]' ); + var hideSiteTaglineSetting = api.instance( 'generate_settings[hide_tagline]' ); + var headerPaddingTopSetting = api.instance( 'generate_spacing_settings[header_top]' ); + var headerPaddingBottomSetting = api.instance( 'generate_spacing_settings[header_bottom]' ); + + if ( ! headerAlignmentSetting._dirty ) { + headerAlignment = headerAlignmentSetting.get(); + } + + if ( ! navLocationSetting._dirty ) { + navLocation = navLocationSetting.get(); + } + + if ( ! navAlignmentSetting._dirty ) { + navAlignment = navAlignmentSetting.get(); + } + + if ( ! boxAlignmentSetting._dirty ) { + boxAlignment = boxAlignmentSetting.get(); + } + + if ( ! siteTitleFontSizeSetting._dirty ) { + siteTitleFontSize = siteTitleFontSizeSetting.get(); + } + + if ( ! hideSiteTaglineSetting._dirty ) { + hideSiteTagline = hideSiteTaglineSetting.get(); + } + + if ( ! headerPaddingTopSetting._dirty ) { + headerPaddingTop = headerPaddingTopSetting.get(); + } + + if ( ! headerPaddingBottomSetting._dirty ) { + headerPaddingBottom = headerPaddingBottomSetting.get(); + } + + var options = { + headerAlignment: generatepress_defaults.header_alignment_setting, + navLocation: generatepress_defaults.nav_position_setting, + navAlignment: generatepress_defaults.nav_alignment_setting, + boxAlignment: generatepress_defaults.container_alignment, + siteTitleFontSize: generatepress_typography_defaults.site_title_font_size, + hideSiteTagline: generatepress_defaults.hide_tagline, + headerPaddingTop: generatepress_spacing_defaults.header_top, + headerPaddingBottom: generatepress_spacing_defaults.header_bottom, + }; + + if ( 'current' === newval ) { + options = { + headerAlignment: headerAlignment, + navLocation: navLocation, + navAlignment: navAlignment, + boxAlignment: boxAlignment, + siteTitleFontSize: siteTitleFontSize, + hideSiteTagline: hideSiteTagline, + headerPaddingTop: headerPaddingTop, + headerPaddingBottom: headerPaddingBottom, + }; + + setOption( options ); + } + + if ( 'default' === newval ) { + setOption( options ); + } + + if ( 'classic' === newval ) { + var options = { + headerAlignment: 'left', + navLocation: 'nav-below-header', + navAlignment: 'left', + boxAlignment: 'boxes', + siteTitleFontSize: '45', + hideSiteTagline: '', + headerPaddingTop: '40', + headerPaddingBottom: '40', + }; + + setOption( options ); + } + + if ( 'nav-before' === newval ) { + options['headerAlignment'] = 'left'; + options['navLocation'] = 'nav-above-header'; + options['navAlignment'] = 'left'; + + setOption( options ); + } + + if ( 'nav-after' === newval ) { + options['headerAlignment'] = 'left'; + options['navLocation'] = 'nav-below-header'; + options['navAlignment'] = 'left'; + + setOption( options ); + } + + if ( 'nav-before-centered' === newval ) { + options['headerAlignment'] = 'center'; + options['navLocation'] = 'nav-above-header'; + options['navAlignment'] = 'center'; + + setOption( options ); + } + + if ( 'nav-after-centered' === newval ) { + options['headerAlignment'] = 'center'; + options['navLocation'] = 'nav-below-header'; + options['navAlignment'] = 'center'; + + setOption( options ); + } + + if ( 'nav-left' === newval ) { + options['headerAlignment'] = 'left'; + options['navLocation'] = 'nav-float-left'; + options['navAlignment'] = 'right'; + + setOption( options ); + } + } ); + } ); + + api( 'nav_color_presets', function( value ) { + var backgroundColor = false, + textColor = false, + backgroundColorHover = false, + textColorHover = false, + currentBackgroundColor = false, + currentTextColor = false, + subMenuBackgroundColor = false, + subMenuTextColor = false, + subMenuBackgroundColorHover = false, + subMenuTextColorHover = false, + subMenuCurrentBackgroundColor = false, + subMenuCurrentTextColor = false; + + value.bind( function( newval ) { + var backgroundColorSetting = api.instance( 'generate_settings[navigation_background_color]' ), + textColorSetting = api.instance( 'generate_settings[navigation_text_color]' ), + backgroundColorHoverSetting = api.instance( 'generate_settings[navigation_background_hover_color]' ), + textColorHoverSetting = api.instance( 'generate_settings[navigation_text_hover_color]' ), + currentBackgroundColorSetting = api.instance( 'generate_settings[navigation_background_current_color]' ), + currentTextColorSetting = api.instance( 'generate_settings[navigation_text_current_color]' ), + subMenuBackgroundColorSetting = api.instance( 'generate_settings[subnavigation_background_color]' ), + subMenuTextColorSetting = api.instance( 'generate_settings[subnavigation_text_color]' ), + subMenuBackgroundColorHoverSetting = api.instance( 'generate_settings[subnavigation_background_hover_color]' ), + subMenuTextColorHoverSetting = api.instance( 'generate_settings[subnavigation_text_hover_color]' ), + subMenuCurrentBackgroundColorSetting = api.instance( 'generate_settings[subnavigation_background_current_color]' ), + subMenuCurrentTextColorSetting = api.instance( 'generate_settings[subnavigation_text_current_color]' ); + + if ( ! backgroundColorSetting._dirty ) { + backgroundColor = backgroundColorSetting.get(); + } + + if ( ! textColorSetting._dirty ) { + textColor = textColorSetting.get(); + } + + if ( ! backgroundColorHoverSetting._dirty ) { + backgroundColorHover = backgroundColorHoverSetting.get(); + } + + if ( ! textColorHoverSetting._dirty ) { + textColorHover = textColorHoverSetting.get(); + } + + if ( ! currentBackgroundColorSetting._dirty ) { + currentBackgroundColor = currentBackgroundColorSetting.get(); + } + + if ( ! currentTextColorSetting._dirty ) { + currentTextColor = currentTextColorSetting.get(); + } + + if ( ! subMenuBackgroundColorSetting._dirty ) { + subMenuBackgroundColor = subMenuBackgroundColorSetting.get(); + } + + if ( ! subMenuTextColorSetting._dirty ) { + subMenuTextColor = subMenuTextColorSetting.get(); + } + + if ( ! subMenuBackgroundColorHoverSetting._dirty ) { + subMenuBackgroundColorHover = subMenuBackgroundColorHoverSetting.get(); + } + + if ( ! subMenuTextColorHoverSetting._dirty ) { + subMenuTextColorHover = subMenuTextColorHoverSetting.get(); + } + + if ( ! subMenuCurrentBackgroundColorSetting._dirty ) { + subMenuCurrentBackgroundColor = subMenuCurrentBackgroundColorSetting.get(); + } + + if ( ! subMenuCurrentTextColorSetting._dirty ) { + subMenuCurrentTextColor = subMenuCurrentTextColorSetting.get(); + } + + if ( 'current' === newval ) { + backgroundColorSetting.set( backgroundColor ); + textColorSetting.set( textColor ); + + backgroundColorHoverSetting.set( backgroundColorHover ); + textColorHoverSetting.set( textColorHover ); + + currentBackgroundColorSetting.set( currentBackgroundColor ); + currentTextColorSetting.set( currentTextColorSetting ); + + subMenuBackgroundColorSetting.set( subMenuBackgroundColor ); + subMenuTextColorSetting.set( subMenuTextColor ); + + subMenuBackgroundColorHoverSetting.set( subMenuBackgroundColorHover ); + subMenuTextColorHoverSetting.set( subMenuTextColorHover ); + + subMenuCurrentBackgroundColorSetting.set( subMenuCurrentBackgroundColor ); + subMenuCurrentTextColorSetting.set( subMenuCurrentTextColorSetting ); + } + + if ( 'default' === newval ) { + backgroundColorSetting.set( generatepress_color_defaults.navigation_background_color ); + textColorSetting.set( generatepress_color_defaults.navigation_text_color ); + + backgroundColorHoverSetting.set( generatepress_color_defaults.navigation_background_hover_color ); + textColorHoverSetting.set( generatepress_color_defaults.navigation_text_hover_color ); + + currentBackgroundColorSetting.set( generatepress_color_defaults.navigation_background_current_color ); + currentTextColorSetting.set( generatepress_color_defaults.navigation_text_current_color ); + + subMenuBackgroundColorSetting.set( generatepress_color_defaults.subnavigation_background_color ); + subMenuTextColorSetting.set( generatepress_color_defaults.subnavigation_text_color ); + + subMenuBackgroundColorHoverSetting.set( generatepress_color_defaults.subnavigation_background_hover_color ); + subMenuTextColorHoverSetting.set( generatepress_color_defaults.subnavigation_text_hover_color ); + + subMenuCurrentBackgroundColorSetting.set( generatepress_color_defaults.subnavigation_background_current_color ); + subMenuCurrentTextColorSetting.set( generatepress_color_defaults.subnavigation_text_current_color ); + } + + if ( 'classic' === newval ) { + backgroundColorSetting.set( '#222222' ); + textColorSetting.set( '#ffffff' ); + + backgroundColorHoverSetting.set( '#3f3f3f' ); + textColorHoverSetting.set( '#ffffff' ); + + currentBackgroundColorSetting.set( '#3f3f3f' ); + currentTextColorSetting.set( '#ffffff' ); + + subMenuBackgroundColorSetting.set( '#3f3f3f' ); + subMenuTextColorSetting.set( '#ffffff' ); + + subMenuBackgroundColorHoverSetting.set( '#4f4f4f' ); + subMenuTextColorHoverSetting.set( '#ffffff' ); + + subMenuCurrentBackgroundColorSetting.set( '#4f4f4f' ); + subMenuCurrentTextColorSetting.set( '#ffffff' ); + } + + if ( 'grey' === newval ) { + backgroundColorSetting.set( '#595959' ); + textColorSetting.set( '#ffffff' ); + + backgroundColorHoverSetting.set( '#424242' ); + textColorHoverSetting.set( '#ffffff' ); + + currentBackgroundColorSetting.set( '#424242' ); + currentTextColorSetting.set( '#ffffff' ); + + subMenuBackgroundColorSetting.set( '#424242' ); + subMenuTextColorSetting.set( '#ffffff' ); + + subMenuBackgroundColorHoverSetting.set( '#424242' ); + subMenuTextColorHoverSetting.set( '#dbdbdb' ); + + subMenuCurrentBackgroundColorSetting.set( '#424242' ); + subMenuCurrentTextColorSetting.set( '#dbdbdb' ); + } + + if ( 'blue' === newval ) { + backgroundColorSetting.set( '#1e73be' ); + textColorSetting.set( '#ffffff' ); + + backgroundColorHoverSetting.set( '#035a9e' ); + textColorHoverSetting.set( '#ffffff' ); + + currentBackgroundColorSetting.set( '#035a9e' ); + currentTextColorSetting.set( '#ffffff' ); + + subMenuBackgroundColorSetting.set( '#035a9e' ); + subMenuTextColorSetting.set( '#ffffff' ); + + subMenuBackgroundColorHoverSetting.set( '#035a9e' ); + subMenuTextColorHoverSetting.set( '#bbd2e8' ); + + subMenuCurrentBackgroundColorSetting.set( '#035a9e' ); + subMenuCurrentTextColorSetting.set( '#bbd2e8' ); + } + + if ( 'red' === newval ) { + backgroundColorSetting.set( '#ed4250' ); + textColorSetting.set( '#ffffff' ); + + backgroundColorHoverSetting.set( '#c42f2f' ); + textColorHoverSetting.set( '#ffffff' ); + + currentBackgroundColorSetting.set( '#c42f2f' ); + currentTextColorSetting.set( '#ffffff' ); + + subMenuBackgroundColorSetting.set( '#c42f2f' ); + subMenuTextColorSetting.set( '#ffffff' ); + + subMenuBackgroundColorHoverSetting.set( '#c42f2f' ); + subMenuTextColorHoverSetting.set( '#fcd9d6' ); + + subMenuCurrentBackgroundColorSetting.set( '#c42f2f' ); + subMenuCurrentTextColorSetting.set( '#fcd9d6' ); + } + + if ( 'green' === newval ) { + backgroundColorSetting.set( '#16aa74' ); + textColorSetting.set( '#ffffff' ); + + backgroundColorHoverSetting.set( '#119b6d' ); + textColorHoverSetting.set( '#ffffff' ); + + currentBackgroundColorSetting.set( '#119b6d' ); + currentTextColorSetting.set( '#ffffff' ); + + subMenuBackgroundColorSetting.set( '#119b6d' ); + subMenuTextColorSetting.set( '#ffffff' ); + + subMenuBackgroundColorHoverSetting.set( '#119b6d' ); + subMenuTextColorHoverSetting.set( '#c2e8de' ); + + subMenuCurrentBackgroundColorSetting.set( '#119b6d' ); + subMenuCurrentTextColorSetting.set( '#c2e8de' ); + } + + jQuery('.wp-color-picker').wpColorPicker().change(); + } ); + } ); + +}( wp.customize ) ); diff --git a/wp-content/themes/generatepress/inc/customizer/controls/js/customizer-live-preview.js b/wp-content/themes/generatepress/inc/customizer/controls/js/customizer-live-preview.js index 552d1f5d..d8b22c4b 100644 --- a/wp-content/themes/generatepress/inc/customizer/controls/js/customizer-live-preview.js +++ b/wp-content/themes/generatepress/inc/customizer/controls/js/customizer-live-preview.js @@ -1,664 +1,664 @@ -/** - * Theme Customizer enhancements for a better user experience. - * - * Contains handlers to make Theme Customizer preview reload changes asynchronously. - */ -function generatepress_colors_live_update( id, selector, property, default_value, get_value ) { - default_value = typeof default_value !== 'undefined' ? default_value : 'initial'; - get_value = typeof get_value !== 'undefined' ? get_value : ''; - - wp.customize( 'generate_settings[' + id + ']', function( value ) { - value.bind( function( newval ) { - default_value = ( '' !== get_value ) ? wp.customize.value('generate_settings[' + get_value + ']')() : default_value; - newval = ( '' !== newval ) ? newval : default_value; - - if ( jQuery( 'style#' + id ).length ) { - jQuery( 'style#' + id ).html( selector + '{' + property + ':' + newval + ';}' ); - } else { - jQuery( 'head' ).append( '' ); - setTimeout(function() { - jQuery( 'style#' + id ).not( ':last' ).remove(); - }, 1000); - } - } ); - } ); -} - -function generatepress_classes_live_update( id, classes, selector, prefix ) { - classes = typeof classes !== 'undefined' ? classes : ''; - prefix = typeof prefix !== 'undefined' ? prefix : ''; - wp.customize( 'generate_settings[' + id + ']', function( value ) { - value.bind( function( newval ) { - jQuery.each( classes, function( i, v ) { - jQuery( selector ).removeClass( prefix + v ); - }); - jQuery( selector ).addClass( prefix + newval ); - } ); - } ); -} - -function generatepress_typography_live_update( id, selector, property, unit, media, settings ) { - settings = typeof settings !== 'undefined' ? settings : 'generate_settings'; - wp.customize( settings + '[' + id + ']', function( value ) { - value.bind( function( newval ) { - // Get our unit if applicable - unit = typeof unit !== 'undefined' ? unit : ''; - - var isTablet = ( 'tablet' == id.substring( 0, 6 ) ) ? true : false, - isMobile = ( 'mobile' == id.substring( 0, 6 ) ) ? true : false; - - if ( isTablet ) { - if ( '' == wp.customize(settings + '[' + id + ']').get() ) { - var desktopID = id.replace( 'tablet_', '' ); - newval = wp.customize(settings + '[' + desktopID + ']').get(); - } - } - - if ( isMobile ) { - if ( '' == wp.customize(settings + '[' + id + ']').get() ) { - var desktopID = id.replace( 'mobile_', '' ); - newval = wp.customize(settings + '[' + desktopID + ']').get(); - } - } - - if ( 'buttons_font_size' == id && '' == wp.customize('generate_settings[buttons_font_size]').get() ) { - newval = wp.customize('generate_settings[body_font_size]').get(); - } - - // We're using a desktop value - if ( ! isTablet && ! isMobile ) { - - var tabletValue = ( typeof wp.customize(settings + '[tablet_' + id + ']') !== 'undefined' ) ? wp.customize(settings + '[tablet_' + id + ']').get() : '', - mobileValue = ( typeof wp.customize(settings + '[mobile_' + id + ']') !== 'undefined' ) ? wp.customize(settings + '[mobile_' + id + ']').get() : ''; - - // The tablet setting exists, mobile doesn't - if ( '' !== tabletValue && '' == mobileValue ) { - media = generatepress_live_preview.desktop + ', ' + generatepress_live_preview.mobile; - } - - // The tablet setting doesn't exist, mobile does - if ( '' == tabletValue && '' !== mobileValue ) { - media = generatepress_live_preview.desktop + ', ' + generatepress_live_preview.tablet; - } - - // The tablet setting doesn't exist, neither does mobile - if ( '' == tabletValue && '' == mobileValue ) { - media = generatepress_live_preview.desktop + ', ' + generatepress_live_preview.tablet + ', ' + generatepress_live_preview.mobile; - } - - } - - // Check if media query - media_query = typeof media !== 'undefined' ? 'media="' + media + '"' : ''; - - jQuery( 'head' ).append( '' ); - setTimeout(function() { - jQuery( 'style#' + id ).not( ':last' ).remove(); - }, 1000); - - setTimeout("jQuery('body').trigger('generate_spacing_updated');", 1000); - } ); - } ); -} - -( function( $ ) { - - // Update the site title in real time... - wp.customize( 'blogname', function( value ) { - value.bind( function( newval ) { - $( '.main-title a' ).html( newval ); - } ); - } ); - - //Update the site description in real time... - wp.customize( 'blogdescription', function( value ) { - value.bind( function( newval ) { - $( '.site-description' ).html( newval ); - } ); - } ); - - wp.customize( 'generate_settings[logo_width]', function( value ) { - value.bind( function( newval ) { - $( '.site-header .header-image' ).css( 'width', newval + 'px' ); - - if ( '' == newval ) { - $( '.site-header .header-image' ).css( 'width', '' ); - } - } ); - } ); - - /** - * Body background color - * Empty: white - */ - generatepress_colors_live_update( 'background_color', 'body', 'background-color', '#FFFFFF' ); - - /** - * Text color - * Empty: black - */ - generatepress_colors_live_update( 'text_color', 'body', 'color', '#000000' ); - - /** - * Link color - * Empty: initial - */ - generatepress_colors_live_update( 'link_color', 'a, a:visited', 'color', 'initial' ); - - /** - * Link color hover - * Empty: initial - */ - generatepress_colors_live_update( 'link_color_hover', 'a:hover', 'color', 'initial' ); - - /** - * Live update for content & navigation colors thanks to our preset option. - * We only want to run this if GP Premium isn't already doing it. - */ - if ( 'undefined' == typeof generate_colors_live_update ) { - /** - * Blog post title color - * Empty: Body link color - */ - generatepress_colors_live_update( 'blog_post_title_color', '.entry-title a, .entry-title a:visited', 'color', '', 'link_color' ); - - /** - * Blog post title color on hover - * Empty: Body link color on hover - */ - generatepress_colors_live_update( 'blog_post_title_hover_color', '.entry-title a:hover', 'color', '', 'link_color_hover' ); - - /** - * Navigation background color - * Empty: Transparent - */ - generatepress_colors_live_update( 'navigation_background_color', '.main-navigation', 'background-color', 'transparent' ); - - /** - * Primary navigation text color - * Empty: link_color - */ - generatepress_colors_live_update( 'navigation_text_color', - '.main-navigation .main-nav ul li a,\ - .menu-toggle,button.menu-toggle:hover,\ - button.menu-toggle:focus,\ - .main-navigation .mobile-bar-items a,\ - .main-navigation .mobile-bar-items a:hover,\ - .main-navigation .mobile-bar-items a:focus', - 'color', - '', - 'link_color' - ); - - /** - * Primary navigation text color hover - * Empty: link_color_hover - */ - generatepress_colors_live_update( 'navigation_text_hover_color', - '.navigation-search input[type="search"],\ - .navigation-search input[type="search"]:active,\ - .navigation-search input[type="search"]:focus,\ - .main-navigation .main-nav ul li:hover > a,\ - .main-navigation .main-nav ul li:focus > a,\ - .main-navigation .main-nav ul li.sfHover > a', - 'color', - '', - 'link_color_hover' - ); - - /** - * Primary navigation menu item hover - * Empty: transparent - */ - generatepress_colors_live_update( 'navigation_background_hover_color', - '.navigation-search input[type="search"],\ - .navigation-search input[type="search"]:focus,\ - .main-navigation .main-nav ul li:hover > a,\ - .main-navigation .main-nav ul li:focus > a,\ - .main-navigation .main-nav ul li.sfHover > a', - 'background-color', - 'transparent' - ); - - /** - * Primary sub-navigation color - * Empty: transparent - */ - generatepress_colors_live_update( 'subnavigation_background_color', '.main-navigation ul ul', 'background-color', 'transparent' ); - - /** - * Primary sub-navigation text color - * Empty: link_color - */ - generatepress_colors_live_update( 'subnavigation_text_color', '.main-navigation .main-nav ul ul li a', 'color', 'link_color' ); - - /** - * Primary sub-navigation hover - */ - var subnavigation_hover = '.main-navigation .main-nav ul ul li:hover > a, \ - .main-navigation .main-nav ul ul li:focus > a, \ - .main-navigation .main-nav ul ul li.sfHover > a'; - - /** - * Primary sub-navigation text hover - * Empty: link_color_hover - */ - generatepress_colors_live_update( 'subnavigation_text_hover_color', subnavigation_hover, 'color', '', 'link_color_hover' ); - - /** - * Primary sub-navigation background hover - * Empty: transparent - */ - generatepress_colors_live_update( 'subnavigation_background_hover_color', subnavigation_hover, 'background-color', 'transparent' ); - - /** - * Navigation current selectors - */ - var navigation_current = '.main-navigation .main-nav ul li[class*="current-menu-"] > a, \ - .main-navigation .main-nav ul li[class*="current-menu-"]:hover > a, \ - .main-navigation .main-nav ul li[class*="current-menu-"].sfHover > a'; - - /** - * Primary navigation current text - * Empty: link_color - */ - generatepress_colors_live_update( 'navigation_text_current_color', navigation_current, 'color', '', 'link_color' ); - - /** - * Primary navigation current background - * Empty: transparent - */ - generatepress_colors_live_update( 'navigation_background_current_color', navigation_current, 'background-color', 'transparent' ); - - /** - * Primary sub-navigation current selectors - */ - var subnavigation_current = '.main-navigation .main-nav ul ul li[class*="current-menu-"] > a,\ - .main-navigation .main-nav ul ul li[class*="current-menu-"]:hover > a, \ - .main-navigation .main-nav ul ul li[class*="current-menu-"].sfHover > a'; - - /** - * Primary sub-navigation current text - * Empty: link_color - */ - generatepress_colors_live_update( 'subnavigation_text_current_color', subnavigation_current, 'color', '', 'link_color' ); - - /** - * Primary navigation current item background - * Empty: transparent - */ - generatepress_colors_live_update( 'subnavigation_background_current_color', subnavigation_current, 'background-color', 'transparent' ); - } - - /** - * Container width - */ - wp.customize( 'generate_settings[container_width]', function( value ) { - value.bind( function( newval ) { - if ( jQuery( 'style#container_width' ).length ) { - jQuery( 'style#container_width' ).html( 'body .grid-container, .wp-block-group__inner-container{max-width:' + newval + 'px;}' ); - } else { - jQuery( 'head' ).append( '' ); - setTimeout(function() { - jQuery( 'style#container_width' ).not( ':last' ).remove(); - }, 100); - } - jQuery('body').trigger('generate_spacing_updated'); - } ); - } ); - - /** - * Live update for typography options. - * We only want to run this if GP Premium isn't already doing it. - */ - if ( 'undefined' == typeof gp_premium_typography_live_update ) { - /** - * Body font size, weight and transform - */ - generatepress_typography_live_update( 'body_font_size', 'body, button, input, select, textarea', 'font-size', 'px' ); - generatepress_typography_live_update( 'body_line_height', 'body', 'line-height', '' ); - generatepress_typography_live_update( 'paragraph_margin', 'p, .entry-content > [class*="wp-block-"]:not(:last-child)', 'margin-bottom', 'em' ); - generatepress_typography_live_update( 'body_font_weight', 'body, button, input, select, textarea', 'font-weight' ); - generatepress_typography_live_update( 'body_font_transform', 'body, button, input, select, textarea', 'text-transform' ); - - /** - * H1 font size, weight and transform - */ - generatepress_typography_live_update( 'heading_1_font_size', 'h1', 'font-size', 'px', generatepress_live_preview.desktop ); - generatepress_typography_live_update( 'mobile_heading_1_font_size', 'h1', 'font-size', 'px', generatepress_live_preview.mobile ); - generatepress_typography_live_update( 'heading_1_weight', 'h1', 'font-weight' ); - generatepress_typography_live_update( 'heading_1_transform', 'h1', 'text-transform' ); - generatepress_typography_live_update( 'heading_1_line_height', 'h1', 'line-height', 'em' ); - - /** - * H2 font size, weight and transform - */ - generatepress_typography_live_update( 'heading_2_font_size', 'h2', 'font-size', 'px', generatepress_live_preview.desktop ); - generatepress_typography_live_update( 'mobile_heading_2_font_size', 'h2', 'font-size', 'px', generatepress_live_preview.mobile ); - generatepress_typography_live_update( 'heading_2_weight', 'h2', 'font-weight' ); - generatepress_typography_live_update( 'heading_2_transform', 'h2', 'text-transform' ); - generatepress_typography_live_update( 'heading_2_line_height', 'h2', 'line-height', 'em' ); - - /** - * H3 font size, weight and transform - */ - generatepress_typography_live_update( 'heading_3_font_size', 'h3', 'font-size', 'px' ); - generatepress_typography_live_update( 'heading_3_weight', 'h3', 'font-weight' ); - generatepress_typography_live_update( 'heading_3_transform', 'h3', 'text-transform' ); - generatepress_typography_live_update( 'heading_3_line_height', 'h3', 'line-height', 'em' ); - } - - /** - * Top bar width - */ - wp.customize( 'generate_settings[top_bar_width]', function( value ) { - value.bind( function( newval ) { - if ( 'full' == newval ) { - $( '.top-bar' ).removeClass( 'grid-container' ).removeClass( 'grid-parent' ); - if ( 'contained' == wp.customize.value('generate_settings[top_bar_inner_width]')() ) { - $( '.inside-top-bar' ).addClass( 'grid-container' ).addClass( 'grid-parent' ); - } - } - if ( 'contained' == newval ) { - $( '.top-bar' ).addClass( 'grid-container' ).addClass( 'grid-parent' ); - $( '.inside-top-bar' ).removeClass( 'grid-container' ).removeClass( 'grid-parent' ); - } - } ); - } ); - - /** - * Inner top bar width - */ - wp.customize( 'generate_settings[top_bar_inner_width]', function( value ) { - value.bind( function( newval ) { - if ( 'full' == newval ) { - $( '.inside-top-bar' ).removeClass( 'grid-container' ).removeClass( 'grid-parent' ); - } - if ( 'contained' == newval ) { - $( '.inside-top-bar' ).addClass( 'grid-container' ).addClass( 'grid-parent' ); - } - } ); - } ); - - /** - * Top bar alignment - */ - generatepress_classes_live_update( 'top_bar_alignment', [ 'left', 'center', 'right' ], '.top-bar', 'top-bar-align-' ); - - /** - * Header layout - */ - wp.customize( 'generate_settings[header_layout_setting]', function( value ) { - value.bind( function( newval ) { - if ( 'fluid-header' == newval ) { - $( '.site-header' ).removeClass( 'grid-container' ).removeClass( 'grid-parent' ); - if ( 'contained' == wp.customize.value('generate_settings[header_inner_width]')() ) { - $( '.inside-header' ).addClass( 'grid-container' ).addClass( 'grid-parent' ); - } - } - if ( 'contained-header' == newval ) { - $( '.site-header' ).addClass( 'grid-container' ).addClass( 'grid-parent' ); - $( '.inside-header' ).removeClass( 'grid-container' ).removeClass( 'grid-parent' ); - } - } ); - } ); - - /** - * Inner Header layout - */ - wp.customize( 'generate_settings[header_inner_width]', function( value ) { - value.bind( function( newval ) { - if ( 'full-width' == newval ) { - $( '.inside-header' ).removeClass( 'grid-container' ).removeClass( 'grid-parent' ); - } - if ( 'contained' == newval ) { - $( '.inside-header' ).addClass( 'grid-container' ).addClass( 'grid-parent' ); - } - } ); - } ); - - /** - * Header alignment - */ - generatepress_classes_live_update( 'header_alignment_setting', [ 'left', 'center', 'right' ], 'body', 'header-aligned-' ); - - /** - * Navigation width - */ - wp.customize( 'generate_settings[nav_layout_setting]', function( value ) { - value.bind( function( newval ) { - var navLocation = wp.customize.value('generate_settings[nav_position_setting]')(); - - if ( $( 'body' ).hasClass( 'sticky-enabled' ) ) { - wp.customize.preview.send( 'refresh' ); - } else { - var mainNavigation = $( '.main-navigation' ); - - if ( 'fluid-nav' == newval ) { - mainNavigation.removeClass( 'grid-container' ).removeClass( 'grid-parent' ); - if ( 'full-width' !== wp.customize.value('generate_settings[nav_inner_width]')() ) { - $( '.main-navigation .inside-navigation' ).addClass( 'grid-container' ).addClass( 'grid-parent' ); - } - } - if ( 'contained-nav' == newval ) { - if ( ! mainNavigation.hasClass( 'has-branding' ) && generatepress_live_preview.isFlex && ( 'nav-float-right' === navLocation || 'nav-float-left' === navLocation ) ) { - return; - } - - mainNavigation.addClass( 'grid-container' ).addClass( 'grid-parent' ); - } - } - } ); - } ); - - /** - * Inner navigation width - */ - wp.customize( 'generate_settings[nav_inner_width]', function( value ) { - value.bind( function( newval ) { - if ( 'full-width' == newval ) { - $( '.main-navigation .inside-navigation' ).removeClass( 'grid-container' ).removeClass( 'grid-parent' ); - } - if ( 'contained' == newval ) { - $( '.main-navigation .inside-navigation' ).addClass( 'grid-container' ).addClass( 'grid-parent' ); - } - } ); - } ); - - /** - * Navigation alignment - */ - wp.customize( 'generate_settings[nav_alignment_setting]', function( value ) { - value.bind( function( newval ) { - var classes = [ 'left', 'center', 'right' ]; - var selector = 'body'; - var prefix = 'nav-aligned-'; - - if ( generatepress_live_preview.isFlex ) { - selector = '.main-navigation:not(.slideout-navigation)'; - prefix = 'nav-align-'; - } - - jQuery.each( classes, function( i, v ) { - jQuery( selector ).removeClass( prefix + v ); - }); - - if ( generatepress_live_preview.isFlex && generatepress_live_preview.isRTL ) { - jQuery( selector ).addClass( prefix + newval ); - } else { - if ( 'nav-align-left' !== prefix + newval ) { - jQuery( selector ).addClass( prefix + newval ); - } - } - } ); - } ); - - /** - * Footer width - */ - wp.customize( 'generate_settings[footer_layout_setting]', function( value ) { - value.bind( function( newval ) { - if ( 'fluid-footer' == newval ) { - $( '.site-footer' ).removeClass( 'grid-container' ).removeClass( 'grid-parent' ); - } - if ( 'contained-footer' == newval ) { - $( '.site-footer' ).addClass( 'grid-container' ).addClass( 'grid-parent' ); - } - } ); - } ); - - /** - * Inner footer width - */ - wp.customize( 'generate_settings[footer_inner_width]', function( value ) { - value.bind( function( newval ) { - if ( 'full-width' == newval ) { - if ( $( '.footer-widgets-container' ).length ) { - $( '.footer-widgets-container' ).removeClass( 'grid-container' ).removeClass( 'grid-parent' ); - } else { - $( '.inside-footer-widgets' ).removeClass( 'grid-container' ).removeClass( 'grid-parent' ); - } - $( '.inside-site-info' ).removeClass( 'grid-container' ).removeClass( 'grid-parent' ); - } - if ( 'contained' == newval ) { - if ( $( '.footer-widgets-container' ).length ) { - $( '.footer-widgets-container' ).addClass( 'grid-container' ).addClass( 'grid-parent' ); - } else { - $( '.inside-footer-widgets' ).addClass( 'grid-container' ).addClass( 'grid-parent' ); - } - $( '.inside-site-info' ).addClass( 'grid-container' ).addClass( 'grid-parent' ); - } - } ); - } ); - - /** - * Footer bar alignment - */ - generatepress_classes_live_update( 'footer_bar_alignment', [ 'left', 'center', 'right' ], '.site-footer', 'footer-bar-align-' ); - - jQuery( 'body' ).on( 'generate_spacing_updated', function() { - var containerAlignment = wp.customize( 'generate_settings[container_alignment]' ).get(), - containerWidth = wp.customize( 'generate_settings[container_width]' ).get(), - containerLayout = wp.customize( 'generate_settings[content_layout_setting]' ).get(), - contentLeft = generatepress_live_preview.contentLeft, - contentRight = generatepress_live_preview.contentRight; - - if ( ! generatepress_live_preview.isFlex && 'text' === containerAlignment ) { - if ( typeof wp.customize( 'generate_spacing_settings[content_left]' ) !== 'undefined' ) { - contentLeft = wp.customize( 'generate_spacing_settings[content_left]' ).get(); - } - - if ( typeof wp.customize( 'generate_spacing_settings[content_right]' ) !== 'undefined' ) { - contentRight = wp.customize( 'generate_spacing_settings[content_right]' ).get(); - } - - var newContainerWidth = Number( containerWidth ) + Number( contentLeft ) + Number( contentRight ); - - if ( jQuery( 'style#wide_container_width' ).length ) { - jQuery( 'style#wide_container_width' ).html( 'body:not(.full-width-content) #page{max-width:' + newContainerWidth + 'px;}' ); - } else { - jQuery( 'head' ).append( '' ); - setTimeout(function() { - jQuery( 'style#wide_container_width' ).not( ':last' ).remove(); - }, 100); - } - } - - if ( generatepress_live_preview.isFlex && 'boxes' === containerAlignment ) { - var topBarPaddingLeft = jQuery( '.inside-top-bar' ).css( 'padding-left' ), - topBarPaddingRight = jQuery( '.inside-top-bar' ).css( 'padding-right' ), - headerPaddingLeft = jQuery( '.inside-header' ).css( 'padding-left' ), - headerPaddingRight = jQuery( '.inside-header' ).css( 'padding-right' ), - footerWidgetPaddingLeft = jQuery( '.footer-widgets-container' ).css( 'padding-left' ), - footerWidgetPaddingRight = jQuery( '.footer-widgets-container' ).css( 'padding-right' ), - footerBarPaddingLeft = jQuery( '.inside-footer-bar' ).css( 'padding-left' ), - footerBarPaddingRight = jQuery( '.inside-footer-bar' ).css( 'padding-right' ); - - if ( typeof wp.customize( 'generate_spacing_settings[top_bar_left]' ) !== 'undefined' ) { - topBarPaddingLeft = wp.customize( 'generate_spacing_settings[top_bar_left]' ).get() + 'px'; - } - - if ( typeof wp.customize( 'generate_spacing_settings[top_bar_right]' ) !== 'undefined' ) { - topBarPaddingRight = wp.customize( 'generate_spacing_settings[top_bar_right]' ).get() + 'px'; - } - - if ( typeof wp.customize( 'generate_spacing_settings[header_left]' ) !== 'undefined' ) { - headerPaddingLeft = wp.customize( 'generate_spacing_settings[header_left]' ).get() + 'px'; - } - - if ( typeof wp.customize( 'generate_spacing_settings[header_right]' ) !== 'undefined' ) { - headerPaddingRight = wp.customize( 'generate_spacing_settings[header_right]' ).get() + 'px'; - } - - if ( typeof wp.customize( 'generate_spacing_settings[footer_widget_container_left]' ) !== 'undefined' ) { - footerWidgetPaddingLeft = wp.customize( 'generate_spacing_settings[footer_widget_container_left]' ).get() + 'px'; - } - - if ( typeof wp.customize( 'generate_spacing_settings[footer_widget_container_right]' ) !== 'undefined' ) { - footerWidgetPaddingRight = wp.customize( 'generate_spacing_settings[footer_widget_container_right]' ).get() + 'px'; - } - - if ( typeof wp.customize( 'generate_spacing_settings[footer_left]' ) !== 'undefined' ) { - footerBarPaddingLeft = wp.customize( 'generate_spacing_settings[footer_left]' ).get() + 'px'; - } - - if ( typeof wp.customize( 'generate_spacing_settings[footer_right]' ) !== 'undefined' ) { - footerBarPaddingRight = wp.customize( 'generate_spacing_settings[footer_right]' ).get() + 'px'; - } - - var newTopBarWidth = parseFloat( containerWidth ) + parseFloat( topBarPaddingLeft ) + parseFloat( topBarPaddingRight ), - newHeaderWidth = parseFloat( containerWidth ) + parseFloat( headerPaddingLeft ) + parseFloat( headerPaddingRight ), - newFooterWidgetWidth = parseFloat( containerWidth ) + parseFloat( footerWidgetPaddingLeft ) + parseFloat( footerWidgetPaddingRight ), - newFooterBarWidth = parseFloat( containerWidth ) + parseFloat( footerBarPaddingLeft ) + parseFloat( footerBarPaddingRight ); - - if ( jQuery( 'style#box_sizing_widths' ).length ) { - jQuery( 'style#box_sizing_widths' ).html( '.inside-top-bar.grid-container{max-width:' + newTopBarWidth + 'px;}.inside-header.grid-container{max-width:' + newHeaderWidth + 'px;}.footer-widgets-container.grid-container{max-width:' + newFooterWidgetWidth + 'px;}.inside-site-info.grid-container{max-width:' + newFooterBarWidth + 'px;}' ); - } else { - jQuery( 'head' ).append( '' ); - setTimeout(function() { - jQuery( 'style#box_sizing_widths' ).not( ':last' ).remove(); - }, 100); - } - } - - if ( generatepress_live_preview.isFlex && 'text' === containerAlignment ) { - var headerPaddingLeft = jQuery( '.inside-header' ).css( 'padding-left' ), - headerPaddingRight = jQuery( '.inside-header' ).css( 'padding-right' ), - menuItemPadding = jQuery( '.main-navigation .main-nav ul li a' ).css( 'padding-left' ), - secondaryMenuItemPadding = jQuery( '.secondary-navigation .main-nav ul li a' ).css( 'padding-left' ); - - if ( typeof wp.customize( 'generate_spacing_settings[header_left]' ) !== 'undefined' ) { - headerPaddingLeft = wp.customize( 'generate_spacing_settings[header_left]' ).get() + 'px'; - } - - if ( typeof wp.customize( 'generate_spacing_settings[header_right]' ) !== 'undefined' ) { - headerPaddingRight = wp.customize( 'generate_spacing_settings[header_right]' ).get() + 'px'; - } - - if ( typeof wp.customize( 'generate_spacing_settings[menu_item]' ) !== 'undefined' ) { - menuItemPadding = wp.customize( 'generate_spacing_settings[menu_item]' ).get() + 'px'; - } - - if ( typeof wp.customize( 'generate_spacing_settings[secondary_menu_item]' ) !== 'undefined' ) { - secondaryMenuItemPadding = wp.customize( 'generate_spacing_settings[secondary_menu_item]' ).get() + 'px'; - } - - var newNavPaddingLeft = parseFloat( headerPaddingLeft ) - parseFloat( menuItemPadding ), - newNavPaddingRight = parseFloat( headerPaddingRight ) - parseFloat( menuItemPadding ), - newSecondaryNavPaddingLeft = parseFloat( headerPaddingLeft ) - parseFloat( secondaryMenuItemPadding ), - newSecondaryNavPaddingRight = parseFloat( headerPaddingRight ) - parseFloat( secondaryMenuItemPadding ); - - if ( jQuery( 'style#navigation_padding' ).length ) { - jQuery( 'style#navigation_padding' ).html( '.nav-below-header .main-navigation .inside-navigation.grid-container, .nav-above-header .main-navigation .inside-navigation.grid-container{padding: 0 ' + newNavPaddingRight + 'px 0 ' + newNavPaddingLeft + 'px;}' ); - jQuery( 'style#secondary_navigation_padding' ).html( '.secondary-nav-below-header .secondary-navigation .inside-navigation.grid-container, .secondary-nav-above-header .secondary-navigation .inside-navigation.grid-container{padding: 0 ' + newSecondaryNavPaddingRight + 'px 0 ' + newSecondaryNavPaddingLeft + 'px;}' ); - } else { - jQuery( 'head' ).append( '' ); - jQuery( 'head' ).append( '' ); - setTimeout(function() { - jQuery( 'style#navigation_padding' ).not( ':last' ).remove(); - jQuery( 'style#secondary_navigation_padding' ).not( ':last' ).remove(); - }, 100); - } - } - } ); -} )( jQuery ); +/** + * Theme Customizer enhancements for a better user experience. + * + * Contains handlers to make Theme Customizer preview reload changes asynchronously. + */ +function generatepress_colors_live_update( id, selector, property, default_value, get_value ) { + default_value = typeof default_value !== 'undefined' ? default_value : 'initial'; + get_value = typeof get_value !== 'undefined' ? get_value : ''; + + wp.customize( 'generate_settings[' + id + ']', function( value ) { + value.bind( function( newval ) { + default_value = ( '' !== get_value ) ? wp.customize.value('generate_settings[' + get_value + ']')() : default_value; + newval = ( '' !== newval ) ? newval : default_value; + + if ( jQuery( 'style#' + id ).length ) { + jQuery( 'style#' + id ).html( selector + '{' + property + ':' + newval + ';}' ); + } else { + jQuery( 'head' ).append( '' ); + setTimeout(function() { + jQuery( 'style#' + id ).not( ':last' ).remove(); + }, 1000); + } + } ); + } ); +} + +function generatepress_classes_live_update( id, classes, selector, prefix ) { + classes = typeof classes !== 'undefined' ? classes : ''; + prefix = typeof prefix !== 'undefined' ? prefix : ''; + wp.customize( 'generate_settings[' + id + ']', function( value ) { + value.bind( function( newval ) { + jQuery.each( classes, function( i, v ) { + jQuery( selector ).removeClass( prefix + v ); + }); + jQuery( selector ).addClass( prefix + newval ); + } ); + } ); +} + +function generatepress_typography_live_update( id, selector, property, unit, media, settings ) { + settings = typeof settings !== 'undefined' ? settings : 'generate_settings'; + wp.customize( settings + '[' + id + ']', function( value ) { + value.bind( function( newval ) { + // Get our unit if applicable + unit = typeof unit !== 'undefined' ? unit : ''; + + var isTablet = ( 'tablet' == id.substring( 0, 6 ) ) ? true : false, + isMobile = ( 'mobile' == id.substring( 0, 6 ) ) ? true : false; + + if ( isTablet ) { + if ( '' == wp.customize(settings + '[' + id + ']').get() ) { + var desktopID = id.replace( 'tablet_', '' ); + newval = wp.customize(settings + '[' + desktopID + ']').get(); + } + } + + if ( isMobile ) { + if ( '' == wp.customize(settings + '[' + id + ']').get() ) { + var desktopID = id.replace( 'mobile_', '' ); + newval = wp.customize(settings + '[' + desktopID + ']').get(); + } + } + + if ( 'buttons_font_size' == id && '' == wp.customize('generate_settings[buttons_font_size]').get() ) { + newval = wp.customize('generate_settings[body_font_size]').get(); + } + + // We're using a desktop value + if ( ! isTablet && ! isMobile ) { + + var tabletValue = ( typeof wp.customize(settings + '[tablet_' + id + ']') !== 'undefined' ) ? wp.customize(settings + '[tablet_' + id + ']').get() : '', + mobileValue = ( typeof wp.customize(settings + '[mobile_' + id + ']') !== 'undefined' ) ? wp.customize(settings + '[mobile_' + id + ']').get() : ''; + + // The tablet setting exists, mobile doesn't + if ( '' !== tabletValue && '' == mobileValue ) { + media = generatepress_live_preview.desktop + ', ' + generatepress_live_preview.mobile; + } + + // The tablet setting doesn't exist, mobile does + if ( '' == tabletValue && '' !== mobileValue ) { + media = generatepress_live_preview.desktop + ', ' + generatepress_live_preview.tablet; + } + + // The tablet setting doesn't exist, neither does mobile + if ( '' == tabletValue && '' == mobileValue ) { + media = generatepress_live_preview.desktop + ', ' + generatepress_live_preview.tablet + ', ' + generatepress_live_preview.mobile; + } + + } + + // Check if media query + media_query = typeof media !== 'undefined' ? 'media="' + media + '"' : ''; + + jQuery( 'head' ).append( '' ); + setTimeout(function() { + jQuery( 'style#' + id ).not( ':last' ).remove(); + }, 1000); + + setTimeout("jQuery('body').trigger('generate_spacing_updated');", 1000); + } ); + } ); +} + +( function( $ ) { + + // Update the site title in real time... + wp.customize( 'blogname', function( value ) { + value.bind( function( newval ) { + $( '.main-title a' ).html( newval ); + } ); + } ); + + //Update the site description in real time... + wp.customize( 'blogdescription', function( value ) { + value.bind( function( newval ) { + $( '.site-description' ).html( newval ); + } ); + } ); + + wp.customize( 'generate_settings[logo_width]', function( value ) { + value.bind( function( newval ) { + $( '.site-header .header-image' ).css( 'width', newval + 'px' ); + + if ( '' == newval ) { + $( '.site-header .header-image' ).css( 'width', '' ); + } + } ); + } ); + + /** + * Body background color + * Empty: white + */ + generatepress_colors_live_update( 'background_color', 'body', 'background-color', '#FFFFFF' ); + + /** + * Text color + * Empty: black + */ + generatepress_colors_live_update( 'text_color', 'body', 'color', '#000000' ); + + /** + * Link color + * Empty: initial + */ + generatepress_colors_live_update( 'link_color', 'a, a:visited', 'color', 'initial' ); + + /** + * Link color hover + * Empty: initial + */ + generatepress_colors_live_update( 'link_color_hover', 'a:hover', 'color', 'initial' ); + + /** + * Live update for content & navigation colors thanks to our preset option. + * We only want to run this if GP Premium isn't already doing it. + */ + if ( 'undefined' == typeof generate_colors_live_update ) { + /** + * Blog post title color + * Empty: Body link color + */ + generatepress_colors_live_update( 'blog_post_title_color', '.entry-title a, .entry-title a:visited', 'color', '', 'link_color' ); + + /** + * Blog post title color on hover + * Empty: Body link color on hover + */ + generatepress_colors_live_update( 'blog_post_title_hover_color', '.entry-title a:hover', 'color', '', 'link_color_hover' ); + + /** + * Navigation background color + * Empty: Transparent + */ + generatepress_colors_live_update( 'navigation_background_color', '.main-navigation', 'background-color', 'transparent' ); + + /** + * Primary navigation text color + * Empty: link_color + */ + generatepress_colors_live_update( 'navigation_text_color', + '.main-navigation .main-nav ul li a,\ + .menu-toggle,button.menu-toggle:hover,\ + button.menu-toggle:focus,\ + .main-navigation .mobile-bar-items a,\ + .main-navigation .mobile-bar-items a:hover,\ + .main-navigation .mobile-bar-items a:focus', + 'color', + '', + 'link_color' + ); + + /** + * Primary navigation text color hover + * Empty: link_color_hover + */ + generatepress_colors_live_update( 'navigation_text_hover_color', + '.navigation-search input[type="search"],\ + .navigation-search input[type="search"]:active,\ + .navigation-search input[type="search"]:focus,\ + .main-navigation .main-nav ul li:hover > a,\ + .main-navigation .main-nav ul li:focus > a,\ + .main-navigation .main-nav ul li.sfHover > a', + 'color', + '', + 'link_color_hover' + ); + + /** + * Primary navigation menu item hover + * Empty: transparent + */ + generatepress_colors_live_update( 'navigation_background_hover_color', + '.navigation-search input[type="search"],\ + .navigation-search input[type="search"]:focus,\ + .main-navigation .main-nav ul li:hover > a,\ + .main-navigation .main-nav ul li:focus > a,\ + .main-navigation .main-nav ul li.sfHover > a', + 'background-color', + 'transparent' + ); + + /** + * Primary sub-navigation color + * Empty: transparent + */ + generatepress_colors_live_update( 'subnavigation_background_color', '.main-navigation ul ul', 'background-color', 'transparent' ); + + /** + * Primary sub-navigation text color + * Empty: link_color + */ + generatepress_colors_live_update( 'subnavigation_text_color', '.main-navigation .main-nav ul ul li a', 'color', 'link_color' ); + + /** + * Primary sub-navigation hover + */ + var subnavigation_hover = '.main-navigation .main-nav ul ul li:hover > a, \ + .main-navigation .main-nav ul ul li:focus > a, \ + .main-navigation .main-nav ul ul li.sfHover > a'; + + /** + * Primary sub-navigation text hover + * Empty: link_color_hover + */ + generatepress_colors_live_update( 'subnavigation_text_hover_color', subnavigation_hover, 'color', '', 'link_color_hover' ); + + /** + * Primary sub-navigation background hover + * Empty: transparent + */ + generatepress_colors_live_update( 'subnavigation_background_hover_color', subnavigation_hover, 'background-color', 'transparent' ); + + /** + * Navigation current selectors + */ + var navigation_current = '.main-navigation .main-nav ul li[class*="current-menu-"] > a, \ + .main-navigation .main-nav ul li[class*="current-menu-"]:hover > a, \ + .main-navigation .main-nav ul li[class*="current-menu-"].sfHover > a'; + + /** + * Primary navigation current text + * Empty: link_color + */ + generatepress_colors_live_update( 'navigation_text_current_color', navigation_current, 'color', '', 'link_color' ); + + /** + * Primary navigation current background + * Empty: transparent + */ + generatepress_colors_live_update( 'navigation_background_current_color', navigation_current, 'background-color', 'transparent' ); + + /** + * Primary sub-navigation current selectors + */ + var subnavigation_current = '.main-navigation .main-nav ul ul li[class*="current-menu-"] > a,\ + .main-navigation .main-nav ul ul li[class*="current-menu-"]:hover > a, \ + .main-navigation .main-nav ul ul li[class*="current-menu-"].sfHover > a'; + + /** + * Primary sub-navigation current text + * Empty: link_color + */ + generatepress_colors_live_update( 'subnavigation_text_current_color', subnavigation_current, 'color', '', 'link_color' ); + + /** + * Primary navigation current item background + * Empty: transparent + */ + generatepress_colors_live_update( 'subnavigation_background_current_color', subnavigation_current, 'background-color', 'transparent' ); + } + + /** + * Container width + */ + wp.customize( 'generate_settings[container_width]', function( value ) { + value.bind( function( newval ) { + if ( jQuery( 'style#container_width' ).length ) { + jQuery( 'style#container_width' ).html( 'body .grid-container, .wp-block-group__inner-container{max-width:' + newval + 'px;}' ); + } else { + jQuery( 'head' ).append( '' ); + setTimeout(function() { + jQuery( 'style#container_width' ).not( ':last' ).remove(); + }, 100); + } + jQuery('body').trigger('generate_spacing_updated'); + } ); + } ); + + /** + * Live update for typography options. + * We only want to run this if GP Premium isn't already doing it. + */ + if ( 'undefined' == typeof gp_premium_typography_live_update ) { + /** + * Body font size, weight and transform + */ + generatepress_typography_live_update( 'body_font_size', 'body, button, input, select, textarea', 'font-size', 'px' ); + generatepress_typography_live_update( 'body_line_height', 'body', 'line-height', '' ); + generatepress_typography_live_update( 'paragraph_margin', 'p, .entry-content > [class*="wp-block-"]:not(:last-child)', 'margin-bottom', 'em' ); + generatepress_typography_live_update( 'body_font_weight', 'body, button, input, select, textarea', 'font-weight' ); + generatepress_typography_live_update( 'body_font_transform', 'body, button, input, select, textarea', 'text-transform' ); + + /** + * H1 font size, weight and transform + */ + generatepress_typography_live_update( 'heading_1_font_size', 'h1', 'font-size', 'px', generatepress_live_preview.desktop ); + generatepress_typography_live_update( 'mobile_heading_1_font_size', 'h1', 'font-size', 'px', generatepress_live_preview.mobile ); + generatepress_typography_live_update( 'heading_1_weight', 'h1', 'font-weight' ); + generatepress_typography_live_update( 'heading_1_transform', 'h1', 'text-transform' ); + generatepress_typography_live_update( 'heading_1_line_height', 'h1', 'line-height', 'em' ); + + /** + * H2 font size, weight and transform + */ + generatepress_typography_live_update( 'heading_2_font_size', 'h2', 'font-size', 'px', generatepress_live_preview.desktop ); + generatepress_typography_live_update( 'mobile_heading_2_font_size', 'h2', 'font-size', 'px', generatepress_live_preview.mobile ); + generatepress_typography_live_update( 'heading_2_weight', 'h2', 'font-weight' ); + generatepress_typography_live_update( 'heading_2_transform', 'h2', 'text-transform' ); + generatepress_typography_live_update( 'heading_2_line_height', 'h2', 'line-height', 'em' ); + + /** + * H3 font size, weight and transform + */ + generatepress_typography_live_update( 'heading_3_font_size', 'h3', 'font-size', 'px' ); + generatepress_typography_live_update( 'heading_3_weight', 'h3', 'font-weight' ); + generatepress_typography_live_update( 'heading_3_transform', 'h3', 'text-transform' ); + generatepress_typography_live_update( 'heading_3_line_height', 'h3', 'line-height', 'em' ); + } + + /** + * Top bar width + */ + wp.customize( 'generate_settings[top_bar_width]', function( value ) { + value.bind( function( newval ) { + if ( 'full' == newval ) { + $( '.top-bar' ).removeClass( 'grid-container' ).removeClass( 'grid-parent' ); + if ( 'contained' == wp.customize.value('generate_settings[top_bar_inner_width]')() ) { + $( '.inside-top-bar' ).addClass( 'grid-container' ).addClass( 'grid-parent' ); + } + } + if ( 'contained' == newval ) { + $( '.top-bar' ).addClass( 'grid-container' ).addClass( 'grid-parent' ); + $( '.inside-top-bar' ).removeClass( 'grid-container' ).removeClass( 'grid-parent' ); + } + } ); + } ); + + /** + * Inner top bar width + */ + wp.customize( 'generate_settings[top_bar_inner_width]', function( value ) { + value.bind( function( newval ) { + if ( 'full' == newval ) { + $( '.inside-top-bar' ).removeClass( 'grid-container' ).removeClass( 'grid-parent' ); + } + if ( 'contained' == newval ) { + $( '.inside-top-bar' ).addClass( 'grid-container' ).addClass( 'grid-parent' ); + } + } ); + } ); + + /** + * Top bar alignment + */ + generatepress_classes_live_update( 'top_bar_alignment', [ 'left', 'center', 'right' ], '.top-bar', 'top-bar-align-' ); + + /** + * Header layout + */ + wp.customize( 'generate_settings[header_layout_setting]', function( value ) { + value.bind( function( newval ) { + if ( 'fluid-header' == newval ) { + $( '.site-header' ).removeClass( 'grid-container' ).removeClass( 'grid-parent' ); + if ( 'contained' == wp.customize.value('generate_settings[header_inner_width]')() ) { + $( '.inside-header' ).addClass( 'grid-container' ).addClass( 'grid-parent' ); + } + } + if ( 'contained-header' == newval ) { + $( '.site-header' ).addClass( 'grid-container' ).addClass( 'grid-parent' ); + $( '.inside-header' ).removeClass( 'grid-container' ).removeClass( 'grid-parent' ); + } + } ); + } ); + + /** + * Inner Header layout + */ + wp.customize( 'generate_settings[header_inner_width]', function( value ) { + value.bind( function( newval ) { + if ( 'full-width' == newval ) { + $( '.inside-header' ).removeClass( 'grid-container' ).removeClass( 'grid-parent' ); + } + if ( 'contained' == newval ) { + $( '.inside-header' ).addClass( 'grid-container' ).addClass( 'grid-parent' ); + } + } ); + } ); + + /** + * Header alignment + */ + generatepress_classes_live_update( 'header_alignment_setting', [ 'left', 'center', 'right' ], 'body', 'header-aligned-' ); + + /** + * Navigation width + */ + wp.customize( 'generate_settings[nav_layout_setting]', function( value ) { + value.bind( function( newval ) { + var navLocation = wp.customize.value('generate_settings[nav_position_setting]')(); + + if ( $( 'body' ).hasClass( 'sticky-enabled' ) ) { + wp.customize.preview.send( 'refresh' ); + } else { + var mainNavigation = $( '.main-navigation' ); + + if ( 'fluid-nav' == newval ) { + mainNavigation.removeClass( 'grid-container' ).removeClass( 'grid-parent' ); + if ( 'full-width' !== wp.customize.value('generate_settings[nav_inner_width]')() ) { + $( '.main-navigation .inside-navigation' ).addClass( 'grid-container' ).addClass( 'grid-parent' ); + } + } + if ( 'contained-nav' == newval ) { + if ( ! mainNavigation.hasClass( 'has-branding' ) && generatepress_live_preview.isFlex && ( 'nav-float-right' === navLocation || 'nav-float-left' === navLocation ) ) { + return; + } + + mainNavigation.addClass( 'grid-container' ).addClass( 'grid-parent' ); + } + } + } ); + } ); + + /** + * Inner navigation width + */ + wp.customize( 'generate_settings[nav_inner_width]', function( value ) { + value.bind( function( newval ) { + if ( 'full-width' == newval ) { + $( '.main-navigation .inside-navigation' ).removeClass( 'grid-container' ).removeClass( 'grid-parent' ); + } + if ( 'contained' == newval ) { + $( '.main-navigation .inside-navigation' ).addClass( 'grid-container' ).addClass( 'grid-parent' ); + } + } ); + } ); + + /** + * Navigation alignment + */ + wp.customize( 'generate_settings[nav_alignment_setting]', function( value ) { + value.bind( function( newval ) { + var classes = [ 'left', 'center', 'right' ]; + var selector = 'body'; + var prefix = 'nav-aligned-'; + + if ( generatepress_live_preview.isFlex ) { + selector = '.main-navigation:not(.slideout-navigation)'; + prefix = 'nav-align-'; + } + + jQuery.each( classes, function( i, v ) { + jQuery( selector ).removeClass( prefix + v ); + }); + + if ( generatepress_live_preview.isFlex && generatepress_live_preview.isRTL ) { + jQuery( selector ).addClass( prefix + newval ); + } else { + if ( 'nav-align-left' !== prefix + newval ) { + jQuery( selector ).addClass( prefix + newval ); + } + } + } ); + } ); + + /** + * Footer width + */ + wp.customize( 'generate_settings[footer_layout_setting]', function( value ) { + value.bind( function( newval ) { + if ( 'fluid-footer' == newval ) { + $( '.site-footer' ).removeClass( 'grid-container' ).removeClass( 'grid-parent' ); + } + if ( 'contained-footer' == newval ) { + $( '.site-footer' ).addClass( 'grid-container' ).addClass( 'grid-parent' ); + } + } ); + } ); + + /** + * Inner footer width + */ + wp.customize( 'generate_settings[footer_inner_width]', function( value ) { + value.bind( function( newval ) { + if ( 'full-width' == newval ) { + if ( $( '.footer-widgets-container' ).length ) { + $( '.footer-widgets-container' ).removeClass( 'grid-container' ).removeClass( 'grid-parent' ); + } else { + $( '.inside-footer-widgets' ).removeClass( 'grid-container' ).removeClass( 'grid-parent' ); + } + $( '.inside-site-info' ).removeClass( 'grid-container' ).removeClass( 'grid-parent' ); + } + if ( 'contained' == newval ) { + if ( $( '.footer-widgets-container' ).length ) { + $( '.footer-widgets-container' ).addClass( 'grid-container' ).addClass( 'grid-parent' ); + } else { + $( '.inside-footer-widgets' ).addClass( 'grid-container' ).addClass( 'grid-parent' ); + } + $( '.inside-site-info' ).addClass( 'grid-container' ).addClass( 'grid-parent' ); + } + } ); + } ); + + /** + * Footer bar alignment + */ + generatepress_classes_live_update( 'footer_bar_alignment', [ 'left', 'center', 'right' ], '.site-footer', 'footer-bar-align-' ); + + jQuery( 'body' ).on( 'generate_spacing_updated', function() { + var containerAlignment = wp.customize( 'generate_settings[container_alignment]' ).get(), + containerWidth = wp.customize( 'generate_settings[container_width]' ).get(), + containerLayout = wp.customize( 'generate_settings[content_layout_setting]' ).get(), + contentLeft = generatepress_live_preview.contentLeft, + contentRight = generatepress_live_preview.contentRight; + + if ( ! generatepress_live_preview.isFlex && 'text' === containerAlignment ) { + if ( typeof wp.customize( 'generate_spacing_settings[content_left]' ) !== 'undefined' ) { + contentLeft = wp.customize( 'generate_spacing_settings[content_left]' ).get(); + } + + if ( typeof wp.customize( 'generate_spacing_settings[content_right]' ) !== 'undefined' ) { + contentRight = wp.customize( 'generate_spacing_settings[content_right]' ).get(); + } + + var newContainerWidth = Number( containerWidth ) + Number( contentLeft ) + Number( contentRight ); + + if ( jQuery( 'style#wide_container_width' ).length ) { + jQuery( 'style#wide_container_width' ).html( 'body:not(.full-width-content) #page{max-width:' + newContainerWidth + 'px;}' ); + } else { + jQuery( 'head' ).append( '' ); + setTimeout(function() { + jQuery( 'style#wide_container_width' ).not( ':last' ).remove(); + }, 100); + } + } + + if ( generatepress_live_preview.isFlex && 'boxes' === containerAlignment ) { + var topBarPaddingLeft = jQuery( '.inside-top-bar' ).css( 'padding-left' ), + topBarPaddingRight = jQuery( '.inside-top-bar' ).css( 'padding-right' ), + headerPaddingLeft = jQuery( '.inside-header' ).css( 'padding-left' ), + headerPaddingRight = jQuery( '.inside-header' ).css( 'padding-right' ), + footerWidgetPaddingLeft = jQuery( '.footer-widgets-container' ).css( 'padding-left' ), + footerWidgetPaddingRight = jQuery( '.footer-widgets-container' ).css( 'padding-right' ), + footerBarPaddingLeft = jQuery( '.inside-footer-bar' ).css( 'padding-left' ), + footerBarPaddingRight = jQuery( '.inside-footer-bar' ).css( 'padding-right' ); + + if ( typeof wp.customize( 'generate_spacing_settings[top_bar_left]' ) !== 'undefined' ) { + topBarPaddingLeft = wp.customize( 'generate_spacing_settings[top_bar_left]' ).get() + 'px'; + } + + if ( typeof wp.customize( 'generate_spacing_settings[top_bar_right]' ) !== 'undefined' ) { + topBarPaddingRight = wp.customize( 'generate_spacing_settings[top_bar_right]' ).get() + 'px'; + } + + if ( typeof wp.customize( 'generate_spacing_settings[header_left]' ) !== 'undefined' ) { + headerPaddingLeft = wp.customize( 'generate_spacing_settings[header_left]' ).get() + 'px'; + } + + if ( typeof wp.customize( 'generate_spacing_settings[header_right]' ) !== 'undefined' ) { + headerPaddingRight = wp.customize( 'generate_spacing_settings[header_right]' ).get() + 'px'; + } + + if ( typeof wp.customize( 'generate_spacing_settings[footer_widget_container_left]' ) !== 'undefined' ) { + footerWidgetPaddingLeft = wp.customize( 'generate_spacing_settings[footer_widget_container_left]' ).get() + 'px'; + } + + if ( typeof wp.customize( 'generate_spacing_settings[footer_widget_container_right]' ) !== 'undefined' ) { + footerWidgetPaddingRight = wp.customize( 'generate_spacing_settings[footer_widget_container_right]' ).get() + 'px'; + } + + if ( typeof wp.customize( 'generate_spacing_settings[footer_left]' ) !== 'undefined' ) { + footerBarPaddingLeft = wp.customize( 'generate_spacing_settings[footer_left]' ).get() + 'px'; + } + + if ( typeof wp.customize( 'generate_spacing_settings[footer_right]' ) !== 'undefined' ) { + footerBarPaddingRight = wp.customize( 'generate_spacing_settings[footer_right]' ).get() + 'px'; + } + + var newTopBarWidth = parseFloat( containerWidth ) + parseFloat( topBarPaddingLeft ) + parseFloat( topBarPaddingRight ), + newHeaderWidth = parseFloat( containerWidth ) + parseFloat( headerPaddingLeft ) + parseFloat( headerPaddingRight ), + newFooterWidgetWidth = parseFloat( containerWidth ) + parseFloat( footerWidgetPaddingLeft ) + parseFloat( footerWidgetPaddingRight ), + newFooterBarWidth = parseFloat( containerWidth ) + parseFloat( footerBarPaddingLeft ) + parseFloat( footerBarPaddingRight ); + + if ( jQuery( 'style#box_sizing_widths' ).length ) { + jQuery( 'style#box_sizing_widths' ).html( '.inside-top-bar.grid-container{max-width:' + newTopBarWidth + 'px;}.inside-header.grid-container{max-width:' + newHeaderWidth + 'px;}.footer-widgets-container.grid-container{max-width:' + newFooterWidgetWidth + 'px;}.inside-site-info.grid-container{max-width:' + newFooterBarWidth + 'px;}' ); + } else { + jQuery( 'head' ).append( '' ); + setTimeout(function() { + jQuery( 'style#box_sizing_widths' ).not( ':last' ).remove(); + }, 100); + } + } + + if ( generatepress_live_preview.isFlex && 'text' === containerAlignment ) { + var headerPaddingLeft = jQuery( '.inside-header' ).css( 'padding-left' ), + headerPaddingRight = jQuery( '.inside-header' ).css( 'padding-right' ), + menuItemPadding = jQuery( '.main-navigation .main-nav ul li a' ).css( 'padding-left' ), + secondaryMenuItemPadding = jQuery( '.secondary-navigation .main-nav ul li a' ).css( 'padding-left' ); + + if ( typeof wp.customize( 'generate_spacing_settings[header_left]' ) !== 'undefined' ) { + headerPaddingLeft = wp.customize( 'generate_spacing_settings[header_left]' ).get() + 'px'; + } + + if ( typeof wp.customize( 'generate_spacing_settings[header_right]' ) !== 'undefined' ) { + headerPaddingRight = wp.customize( 'generate_spacing_settings[header_right]' ).get() + 'px'; + } + + if ( typeof wp.customize( 'generate_spacing_settings[menu_item]' ) !== 'undefined' ) { + menuItemPadding = wp.customize( 'generate_spacing_settings[menu_item]' ).get() + 'px'; + } + + if ( typeof wp.customize( 'generate_spacing_settings[secondary_menu_item]' ) !== 'undefined' ) { + secondaryMenuItemPadding = wp.customize( 'generate_spacing_settings[secondary_menu_item]' ).get() + 'px'; + } + + var newNavPaddingLeft = parseFloat( headerPaddingLeft ) - parseFloat( menuItemPadding ), + newNavPaddingRight = parseFloat( headerPaddingRight ) - parseFloat( menuItemPadding ), + newSecondaryNavPaddingLeft = parseFloat( headerPaddingLeft ) - parseFloat( secondaryMenuItemPadding ), + newSecondaryNavPaddingRight = parseFloat( headerPaddingRight ) - parseFloat( secondaryMenuItemPadding ); + + if ( jQuery( 'style#navigation_padding' ).length ) { + jQuery( 'style#navigation_padding' ).html( '.nav-below-header .main-navigation .inside-navigation.grid-container, .nav-above-header .main-navigation .inside-navigation.grid-container{padding: 0 ' + newNavPaddingRight + 'px 0 ' + newNavPaddingLeft + 'px;}' ); + jQuery( 'style#secondary_navigation_padding' ).html( '.secondary-nav-below-header .secondary-navigation .inside-navigation.grid-container, .secondary-nav-above-header .secondary-navigation .inside-navigation.grid-container{padding: 0 ' + newSecondaryNavPaddingRight + 'px 0 ' + newSecondaryNavPaddingLeft + 'px;}' ); + } else { + jQuery( 'head' ).append( '' ); + jQuery( 'head' ).append( '' ); + setTimeout(function() { + jQuery( 'style#navigation_padding' ).not( ':last' ).remove(); + jQuery( 'style#secondary_navigation_padding' ).not( ':last' ).remove(); + }, 100); + } + } + } ); +} )( jQuery ); diff --git a/wp-content/themes/generatepress/inc/customizer/customizer-helpers.php b/wp-content/themes/generatepress/inc/customizer/customizer-helpers.php index f256b5a7..6cbbf640 100644 --- a/wp-content/themes/generatepress/inc/customizer/customizer-helpers.php +++ b/wp-content/themes/generatepress/inc/customizer/customizer-helpers.php @@ -1,23 +1,23 @@ -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 ); - } -} - -/** - * Sanitize our Google Font variants - * - * @since 2.0 - * @param string $input The value to check. - */ -function generate_sanitize_variants( $input ) { - if ( is_array( $input ) ) { - $input = implode( ',', $input ); - } - return sanitize_text_field( $input ); -} - -add_action( 'customize_controls_enqueue_scripts', 'generate_do_control_inline_scripts', 100 ); -/** - * Add misc inline scripts to our controls. - * - * We don't want to add these to the controls themselves, as they will be repeated - * each time the control is initialized. - * - * @since 2.0 - */ -function generate_do_control_inline_scripts() { - wp_localize_script( - 'generatepress-typography-customizer', - 'gp_customize', - array( - 'nonce' => wp_create_nonce( 'gp_customize_nonce' ), - ) - ); - - $number_of_fonts = apply_filters( 'generate_number_of_fonts', 200 ); - - wp_localize_script( - 'generatepress-typography-customizer', - 'generatePressTypography', - array( - 'googleFonts' => apply_filters( 'generate_typography_customize_list', generate_get_all_google_fonts( $number_of_fonts ) ), - ) - ); - - wp_localize_script( 'generatepress-typography-customizer', 'typography_defaults', generate_typography_default_fonts() ); - - wp_enqueue_script( 'generatepress-customizer-controls', trailingslashit( get_template_directory_uri() ) . 'inc/customizer/controls/js/customizer-controls.js', array( 'customize-controls', 'jquery' ), GENERATE_VERSION, true ); - wp_localize_script( 'generatepress-customizer-controls', 'generatepress_defaults', generate_get_defaults() ); - wp_localize_script( 'generatepress-customizer-controls', 'generatepress_color_defaults', generate_get_color_defaults() ); - wp_localize_script( 'generatepress-customizer-controls', 'generatepress_typography_defaults', generate_get_default_fonts() ); - wp_localize_script( 'generatepress-customizer-controls', 'generatepress_spacing_defaults', generate_spacing_get_defaults() ); -} - -if ( ! function_exists( 'generate_customizer_live_preview' ) ) { - add_action( 'customize_preview_init', 'generate_customizer_live_preview', 100 ); - /** - * Add our live preview scripts - * - * @since 0.1 - */ - function generate_customizer_live_preview() { - $spacing_settings = wp_parse_args( - get_option( 'generate_spacing_settings', array() ), - generate_spacing_get_defaults() - ); - - wp_enqueue_script( 'generate-themecustomizer', trailingslashit( get_template_directory_uri() ) . 'inc/customizer/controls/js/customizer-live-preview.js', array( 'customize-preview' ), GENERATE_VERSION, true ); - - wp_localize_script( - 'generate-themecustomizer', - 'generatepress_live_preview', - array( - 'mobile' => generate_get_media_query( 'mobile' ), - 'tablet' => generate_get_media_query( 'tablet' ), - 'desktop' => generate_get_media_query( 'desktop' ), - 'contentLeft' => absint( $spacing_settings['content_left'] ), - 'contentRight' => absint( $spacing_settings['content_right'] ), - 'isFlex' => generate_is_using_flexbox(), - 'isRTL' => is_rtl(), - ) - ); - } -} - -/** - * Check to see if we have a logo or not. - * - * Used as an active callback. Calling has_custom_logo creates a PHP notice for - * multisite users. - * - * @since 2.0.1 - */ -function generate_has_custom_logo_callback() { - if ( get_theme_mod( 'custom_logo' ) ) { - return true; - } - - return false; -} - -/** - * Save our preset layout controls. These should always save to be "current". - * - * @since 2.2 - */ -function generate_sanitize_preset_layout() { - return 'current'; -} - -/** - * Display options if we're using the Floats structure. - */ -function generate_is_using_floats_callback() { - return 'floats' === generate_get_option( 'structure' ); -} - -/** - * Callback to determine whether to show the inline logo option. - */ -function generate_show_inline_logo_callback() { - return 'floats' === generate_get_option( 'structure' ) && generate_has_logo_site_branding(); -} +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 ); + } +} + +/** + * Sanitize our Google Font variants + * + * @since 2.0 + * @param string $input The value to check. + */ +function generate_sanitize_variants( $input ) { + if ( is_array( $input ) ) { + $input = implode( ',', $input ); + } + return sanitize_text_field( $input ); +} + +add_action( 'customize_controls_enqueue_scripts', 'generate_do_control_inline_scripts', 100 ); +/** + * Add misc inline scripts to our controls. + * + * We don't want to add these to the controls themselves, as they will be repeated + * each time the control is initialized. + * + * @since 2.0 + */ +function generate_do_control_inline_scripts() { + wp_localize_script( + 'generatepress-typography-customizer', + 'gp_customize', + array( + 'nonce' => wp_create_nonce( 'gp_customize_nonce' ), + ) + ); + + $number_of_fonts = apply_filters( 'generate_number_of_fonts', 200 ); + + wp_localize_script( + 'generatepress-typography-customizer', + 'generatePressTypography', + array( + 'googleFonts' => apply_filters( 'generate_typography_customize_list', generate_get_all_google_fonts( $number_of_fonts ) ), + ) + ); + + wp_localize_script( 'generatepress-typography-customizer', 'typography_defaults', generate_typography_default_fonts() ); + + wp_enqueue_script( 'generatepress-customizer-controls', trailingslashit( get_template_directory_uri() ) . 'inc/customizer/controls/js/customizer-controls.js', array( 'customize-controls', 'jquery' ), GENERATE_VERSION, true ); + wp_localize_script( 'generatepress-customizer-controls', 'generatepress_defaults', generate_get_defaults() ); + wp_localize_script( 'generatepress-customizer-controls', 'generatepress_color_defaults', generate_get_color_defaults() ); + wp_localize_script( 'generatepress-customizer-controls', 'generatepress_typography_defaults', generate_get_default_fonts() ); + wp_localize_script( 'generatepress-customizer-controls', 'generatepress_spacing_defaults', generate_spacing_get_defaults() ); +} + +if ( ! function_exists( 'generate_customizer_live_preview' ) ) { + add_action( 'customize_preview_init', 'generate_customizer_live_preview', 100 ); + /** + * Add our live preview scripts + * + * @since 0.1 + */ + function generate_customizer_live_preview() { + $spacing_settings = wp_parse_args( + get_option( 'generate_spacing_settings', array() ), + generate_spacing_get_defaults() + ); + + wp_enqueue_script( 'generate-themecustomizer', trailingslashit( get_template_directory_uri() ) . 'inc/customizer/controls/js/customizer-live-preview.js', array( 'customize-preview' ), GENERATE_VERSION, true ); + + wp_localize_script( + 'generate-themecustomizer', + 'generatepress_live_preview', + array( + 'mobile' => generate_get_media_query( 'mobile' ), + 'tablet' => generate_get_media_query( 'tablet' ), + 'desktop' => generate_get_media_query( 'desktop' ), + 'contentLeft' => absint( $spacing_settings['content_left'] ), + 'contentRight' => absint( $spacing_settings['content_right'] ), + 'isFlex' => generate_is_using_flexbox(), + 'isRTL' => is_rtl(), + ) + ); + } +} + +/** + * Check to see if we have a logo or not. + * + * Used as an active callback. Calling has_custom_logo creates a PHP notice for + * multisite users. + * + * @since 2.0.1 + */ +function generate_has_custom_logo_callback() { + if ( get_theme_mod( 'custom_logo' ) ) { + return true; + } + + return false; +} + +/** + * Save our preset layout controls. These should always save to be "current". + * + * @since 2.2 + */ +function generate_sanitize_preset_layout() { + return 'current'; +} + +/** + * Display options if we're using the Floats structure. + */ +function generate_is_using_floats_callback() { + return 'floats' === generate_get_option( 'structure' ); +} + +/** + * Callback to determine whether to show the inline logo option. + */ +function generate_show_inline_logo_callback() { + return 'floats' === generate_get_option( 'structure' ) && generate_has_logo_site_branding(); +} diff --git a/wp-content/themes/generatepress/inc/dashboard.php b/wp-content/themes/generatepress/inc/dashboard.php index 6822a56b..241c8c8a 100644 --- a/wp-content/themes/generatepress/inc/dashboard.php +++ b/wp-content/themes/generatepress/inc/dashboard.php @@ -1,378 +1,378 @@ - -
-
-
-
- - -
-
- - - -
-
-
- - - -
-

-
- - -
- %2$s', - esc_url( admin_url( 'customize.php' ) ), - esc_html__( 'Customize', 'generatepress' ) - ); - ?> -
- - -
- - array( - 'url' => generate_get_premium_url( 'https://generatepress.com/premium/#backgrounds', false ), - ), - 'Blog' => array( - 'url' => generate_get_premium_url( 'https://generatepress.com/premium/#blog', false ), - ), - 'Colors' => array( - 'url' => generate_get_premium_url( 'https://generatepress.com/premium/#colors', false ), - ), - 'Copyright' => array( - 'url' => generate_get_premium_url( 'https://generatepress.com/premium/#copyright', false ), - ), - 'Disable Elements' => array( - 'url' => generate_get_premium_url( 'https://generatepress.com/premium/#disable-elements', false ), - ), - 'Elements' => array( - 'url' => generate_get_premium_url( 'https://generatepress.com/premium/#elements', false ), - ), - 'Import / Export' => array( - 'url' => generate_get_premium_url( 'https://generatepress.com/premium/#import-export', false ), - ), - 'Menu Plus' => array( - 'url' => generate_get_premium_url( 'https://generatepress.com/premium/#menu-plus', false ), - ), - 'Secondary Nav' => array( - 'url' => generate_get_premium_url( 'https://generatepress.com/premium/#secondary-nav', false ), - ), - 'Sections' => array( - 'url' => generate_get_premium_url( 'https://generatepress.com/premium/#sections', false ), - ), - 'Site Library' => array( - 'url' => generate_get_premium_url( 'https://generatepress.com/site-library', false ), - ), - 'Spacing' => array( - 'url' => generate_get_premium_url( 'https://generatepress.com/premium/#spacing', false ), - ), - 'Typography' => array( - 'url' => generate_get_premium_url( 'https://generatepress.com/premium/#typography', false ), - ), - 'WooCommerce' => array( - 'url' => generate_get_premium_url( 'https://generatepress.com/premium/#woocommerce', false ), - ), - ); - - if ( ! defined( 'GP_PREMIUM_VERSION' ) ) : - ?> -
-

-
-
- $info ) { - ?> -
-
- -
-
- -
-
-
- -
-
-
- array( - 'title' => __( 'Upload Logo', 'generatepress' ), - 'icon' => 'dashicons-format-image', - 'url' => admin_url( 'customize.php?autofocus[control]=custom_logo' ), - ), - 'typography' => array( - 'title' => __( 'Customize Fonts', 'generatepress' ), - 'icon' => 'dashicons-editor-textcolor', - 'url' => admin_url( $typography_section ), - ), - 'colors' => array( - 'title' => __( 'Customize Colors', 'generatepress' ), - 'icon' => 'dashicons-admin-customizer', - 'url' => admin_url( $colors_section ), - ), - 'layout' => array( - 'title' => __( 'Layout Options', 'generatepress' ), - 'icon' => 'dashicons-layout', - 'url' => admin_url( 'customize.php?autofocus[panel]=generate_layout_panel' ), - ), - 'all' => array( - 'title' => __( 'All Options', 'generatepress' ), - 'icon' => 'dashicons-admin-generic', - 'url' => admin_url( 'customize.php' ), - ), - ); - ?> -
- -
-
-

-
-
    - $data ) { - printf( - '
  • %3$s
  • ', - esc_attr( $data['icon'] ), - esc_url( $data['url'] ), - esc_html( $data['title'] ) - ); - } - ?> -
- -

- -
-
- - - -
-

-
-

-
-

-

- esc_js( $warning ), - ) - ); - ?> -

- -
- -
-
-
-
-
- -
-
-
- base ) { - return; - } - - if ( isset( $_GET['settings-updated'] ) && 'true' === $_GET['settings-updated'] ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Only checking. False positive. - add_settings_error( 'generate-notices', 'true', esc_html__( 'Settings saved.', 'generatepress' ), 'updated' ); - } - - // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Only checking. False positive. - if ( isset( $_GET['status'] ) && 'imported' === $_GET['status'] ) { - add_settings_error( 'generate-notices', 'imported', esc_html__( 'Import successful.', 'generatepress' ), 'updated' ); - } - - // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Only checking. False positive. - if ( isset( $_GET['status'] ) && 'reset' === $_GET['status'] ) { - add_settings_error( 'generate-notices', 'reset', esc_html__( 'Settings removed.', 'generatepress' ), 'updated' ); - } - - settings_errors( 'generate-notices' ); - } -} + +
+
+
+
+ + +
+
+ + + +
+
+
+ + + +
+

+
+ + +
+ %2$s', + esc_url( admin_url( 'customize.php' ) ), + esc_html__( 'Customize', 'generatepress' ) + ); + ?> +
+ + +
+ + array( + 'url' => generate_get_premium_url( 'https://generatepress.com/premium/#backgrounds', false ), + ), + 'Blog' => array( + 'url' => generate_get_premium_url( 'https://generatepress.com/premium/#blog', false ), + ), + 'Colors' => array( + 'url' => generate_get_premium_url( 'https://generatepress.com/premium/#colors', false ), + ), + 'Copyright' => array( + 'url' => generate_get_premium_url( 'https://generatepress.com/premium/#copyright', false ), + ), + 'Disable Elements' => array( + 'url' => generate_get_premium_url( 'https://generatepress.com/premium/#disable-elements', false ), + ), + 'Elements' => array( + 'url' => generate_get_premium_url( 'https://generatepress.com/premium/#elements', false ), + ), + 'Import / Export' => array( + 'url' => generate_get_premium_url( 'https://generatepress.com/premium/#import-export', false ), + ), + 'Menu Plus' => array( + 'url' => generate_get_premium_url( 'https://generatepress.com/premium/#menu-plus', false ), + ), + 'Secondary Nav' => array( + 'url' => generate_get_premium_url( 'https://generatepress.com/premium/#secondary-nav', false ), + ), + 'Sections' => array( + 'url' => generate_get_premium_url( 'https://generatepress.com/premium/#sections', false ), + ), + 'Site Library' => array( + 'url' => generate_get_premium_url( 'https://generatepress.com/site-library', false ), + ), + 'Spacing' => array( + 'url' => generate_get_premium_url( 'https://generatepress.com/premium/#spacing', false ), + ), + 'Typography' => array( + 'url' => generate_get_premium_url( 'https://generatepress.com/premium/#typography', false ), + ), + 'WooCommerce' => array( + 'url' => generate_get_premium_url( 'https://generatepress.com/premium/#woocommerce', false ), + ), + ); + + if ( ! defined( 'GP_PREMIUM_VERSION' ) ) : + ?> +
+

+
+
+ $info ) { + ?> +
+
+ +
+
+ +
+
+
+ +
+
+
+ array( + 'title' => __( 'Upload Logo', 'generatepress' ), + 'icon' => 'dashicons-format-image', + 'url' => admin_url( 'customize.php?autofocus[control]=custom_logo' ), + ), + 'typography' => array( + 'title' => __( 'Customize Fonts', 'generatepress' ), + 'icon' => 'dashicons-editor-textcolor', + 'url' => admin_url( $typography_section ), + ), + 'colors' => array( + 'title' => __( 'Customize Colors', 'generatepress' ), + 'icon' => 'dashicons-admin-customizer', + 'url' => admin_url( $colors_section ), + ), + 'layout' => array( + 'title' => __( 'Layout Options', 'generatepress' ), + 'icon' => 'dashicons-layout', + 'url' => admin_url( 'customize.php?autofocus[panel]=generate_layout_panel' ), + ), + 'all' => array( + 'title' => __( 'All Options', 'generatepress' ), + 'icon' => 'dashicons-admin-generic', + 'url' => admin_url( 'customize.php' ), + ), + ); + ?> +
+ +
+
+

+
+
    + $data ) { + printf( + '
  • %3$s
  • ', + esc_attr( $data['icon'] ), + esc_url( $data['url'] ), + esc_html( $data['title'] ) + ); + } + ?> +
+ +

+ +
+
+ + + +
+

+
+

+
+

+

+ esc_js( $warning ), + ) + ); + ?> +

+ +
+ +
+
+
+
+
+ +
+
+
+ base ) { + return; + } + + if ( isset( $_GET['settings-updated'] ) && 'true' === $_GET['settings-updated'] ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Only checking. False positive. + add_settings_error( 'generate-notices', 'true', esc_html__( 'Settings saved.', 'generatepress' ), 'updated' ); + } + + // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Only checking. False positive. + if ( isset( $_GET['status'] ) && 'imported' === $_GET['status'] ) { + add_settings_error( 'generate-notices', 'imported', esc_html__( 'Import successful.', 'generatepress' ), 'updated' ); + } + + // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Only checking. False positive. + if ( isset( $_GET['status'] ) && 'reset' === $_GET['status'] ) { + add_settings_error( 'generate-notices', 'reset', esc_html__( 'Settings removed.', 'generatepress' ), 'updated' ); + } + + settings_errors( 'generate-notices' ); + } +} diff --git a/wp-content/themes/generatepress/inc/defaults.php b/wp-content/themes/generatepress/inc/defaults.php index 61b490a5..bbde21c8 100644 --- a/wp-content/themes/generatepress/inc/defaults.php +++ b/wp-content/themes/generatepress/inc/defaults.php @@ -1,368 +1,368 @@ - '', - 'hide_tagline' => true, - 'logo' => '', - 'inline_logo_site_branding' => false, - 'retina_logo' => '', - 'logo_width' => '', - 'top_bar_width' => 'full', - 'top_bar_inner_width' => 'contained', - 'top_bar_alignment' => 'right', - 'container_width' => '1200', - 'container_alignment' => 'text', - 'header_layout_setting' => 'fluid-header', - 'header_inner_width' => 'contained', - 'nav_alignment_setting' => is_rtl() ? 'right' : 'left', - 'header_alignment_setting' => is_rtl() ? 'right' : 'left', - 'nav_layout_setting' => 'fluid-nav', - 'nav_inner_width' => 'contained', - 'nav_position_setting' => 'nav-float-right', - 'nav_drop_point' => '', - 'nav_dropdown_type' => 'hover', - 'nav_dropdown_direction' => is_rtl() ? 'left' : 'right', - 'nav_search' => 'disable', - 'content_layout_setting' => 'separate-containers', - 'layout_setting' => 'right-sidebar', - 'blog_layout_setting' => 'right-sidebar', - 'single_layout_setting' => 'right-sidebar', - 'post_content' => 'excerpt', - 'footer_layout_setting' => 'fluid-footer', - 'footer_inner_width' => 'contained', - 'footer_widget_setting' => '3', - 'footer_bar_alignment' => 'right', - 'back_to_top' => '', - 'background_color' => '#f7f8f9', - 'text_color' => '#222222', - 'link_color' => '#1e73be', - 'link_color_hover' => '#000000', - 'link_color_visited' => '', - 'font_awesome_essentials' => true, - 'icons' => 'svg', - 'combine_css' => true, - 'dynamic_css_cache' => true, - 'structure' => 'flexbox', - ) - ); - } -} - -if ( ! function_exists( 'generate_get_color_defaults' ) ) { - /** - * Set default options - */ - function generate_get_color_defaults() { - return apply_filters( - 'generate_color_option_defaults', - array( - 'top_bar_background_color' => '#636363', - 'top_bar_text_color' => '#ffffff', - 'top_bar_link_color' => '#ffffff', - 'top_bar_link_color_hover' => '#303030', - 'header_background_color' => '#ffffff', - 'header_text_color' => '', - 'header_link_color' => '', - 'header_link_hover_color' => '', - 'site_title_color' => '#222222', - 'site_tagline_color' => '#757575', - 'navigation_background_color' => '#ffffff', - 'navigation_text_color' => '#515151', - 'navigation_background_hover_color' => '#ffffff', - 'navigation_text_hover_color' => '#7a8896', - 'navigation_background_current_color' => '#ffffff', - 'navigation_text_current_color' => '#7a8896', - 'subnavigation_background_color' => '#eaeaea', - 'subnavigation_text_color' => '#515151', - 'subnavigation_background_hover_color' => '#eaeaea', - 'subnavigation_text_hover_color' => '#7a8896', - 'subnavigation_background_current_color' => '#eaeaea', - 'subnavigation_text_current_color' => '#7a8896', - 'navigation_search_background_color' => '', - 'navigation_search_text_color' => '', - 'content_background_color' => '#ffffff', - 'content_text_color' => '', - 'content_link_color' => '', - 'content_link_hover_color' => '', - 'content_title_color' => '', - 'blog_post_title_color' => '#222222', - 'blog_post_title_hover_color' => '#55555e', - 'entry_meta_text_color' => '#595959', - 'entry_meta_link_color' => '', - 'entry_meta_link_color_hover' => '', - 'h1_color' => '', - 'h2_color' => '', - 'h3_color' => '', - 'h4_color' => '', - 'h5_color' => '', - 'h6_color' => '', - 'sidebar_widget_background_color' => '#ffffff', - 'sidebar_widget_text_color' => '', - 'sidebar_widget_link_color' => '', - 'sidebar_widget_link_hover_color' => '', - 'sidebar_widget_title_color' => '', - 'footer_widget_background_color' => '#ffffff', - 'footer_widget_text_color' => '', - 'footer_widget_link_color' => '', - 'footer_widget_link_hover_color' => '', - 'footer_widget_title_color' => '#000000', - 'footer_background_color' => '#55555e', - 'footer_text_color' => '#ffffff', - 'footer_link_color' => '#ffffff', - 'footer_link_hover_color' => '#d3d3d3', - 'form_background_color' => '#fafafa', - 'form_text_color' => '#666666', - 'form_background_color_focus' => '#ffffff', - 'form_text_color_focus' => '#666666', - 'form_border_color' => '#cccccc', - 'form_border_color_focus' => '#bfbfbf', - 'form_button_background_color' => '#55555e', - 'form_button_background_color_hover' => '#3f4047', - 'form_button_text_color' => '#ffffff', - 'form_button_text_color_hover' => '#ffffff', - 'back_to_top_background_color' => 'rgba( 0,0,0,0.4 )', - 'back_to_top_background_color_hover' => 'rgba( 0,0,0,0.6 )', - 'back_to_top_text_color' => '#ffffff', - 'back_to_top_text_color_hover' => '#ffffff', - ) - ); - } -} - -if ( ! function_exists( 'generate_get_default_fonts' ) ) { - /** - * Set default options. - * - * @since 0.1 - * - * @param bool $filter Whether to return the filtered values or original values. - * @return array Option defaults. - */ - function generate_get_default_fonts( $filter = true ) { - $defaults = array( - 'font_body' => 'System Stack', - 'font_body_category' => '', - 'font_body_variants' => '', - 'body_font_weight' => 'normal', - 'body_font_transform' => 'none', - 'body_font_size' => '17', - 'body_line_height' => '1.5', // no unit. - 'paragraph_margin' => '1.5', // em. - 'font_top_bar' => 'inherit', - 'font_top_bar_category' => '', - 'font_top_bar_variants' => '', - 'top_bar_font_weight' => 'normal', - 'top_bar_font_transform' => 'none', - 'top_bar_font_size' => '13', - 'font_site_title' => 'inherit', - 'font_site_title_category' => '', - 'font_site_title_variants' => '', - 'site_title_font_weight' => 'bold', - 'site_title_font_transform' => 'none', - 'site_title_font_size' => '25', - 'mobile_site_title_font_size' => '', - 'font_site_tagline' => 'inherit', - 'font_site_tagline_category' => '', - 'font_site_tagline_variants' => '', - 'site_tagline_font_weight' => 'normal', - 'site_tagline_font_transform' => 'none', - 'site_tagline_font_size' => '15', - 'font_navigation' => 'inherit', - 'font_navigation_category' => '', - 'font_navigation_variants' => '', - 'navigation_font_weight' => 'normal', - 'navigation_font_transform' => 'none', - 'navigation_font_size' => '15', - 'font_widget_title' => 'inherit', - 'font_widget_title_category' => '', - 'font_widget_title_variants' => '', - 'widget_title_font_weight' => 'normal', - 'widget_title_font_transform' => 'none', - 'widget_title_font_size' => '20', - 'widget_title_separator' => '30', - 'widget_content_font_size' => '17', - 'font_buttons' => 'inherit', - 'font_buttons_category' => '', - 'font_buttons_variants' => '', - 'buttons_font_weight' => 'normal', - 'buttons_font_transform' => 'none', - 'buttons_font_size' => '', - 'font_heading_1' => 'inherit', - 'font_heading_1_category' => '', - 'font_heading_1_variants' => '', - 'heading_1_weight' => 'normal', - 'heading_1_transform' => 'none', - 'heading_1_font_size' => '42', - 'heading_1_line_height' => '1.2', // em. - 'heading_1_margin_bottom' => '20', - 'mobile_heading_1_font_size' => '31', - 'font_heading_2' => 'inherit', - 'font_heading_2_category' => '', - 'font_heading_2_variants' => '', - 'heading_2_weight' => 'normal', - 'heading_2_transform' => 'none', - 'heading_2_font_size' => '35', - 'heading_2_line_height' => '1.2', // em. - 'heading_2_margin_bottom' => '20', - 'mobile_heading_2_font_size' => '27', - 'font_heading_3' => 'inherit', - 'font_heading_3_category' => '', - 'font_heading_3_variants' => '', - 'heading_3_weight' => 'normal', - 'heading_3_transform' => 'none', - 'heading_3_font_size' => '29', - 'heading_3_line_height' => '1.2', // em. - 'heading_3_margin_bottom' => '20', - 'mobile_heading_3_font_size' => '24', - 'font_heading_4' => 'inherit', - 'font_heading_4_category' => '', - 'font_heading_4_variants' => '', - 'heading_4_weight' => 'normal', - 'heading_4_transform' => 'none', - 'heading_4_font_size' => '24', - 'heading_4_line_height' => '', // em. - 'mobile_heading_4_font_size' => '22', - 'font_heading_5' => 'inherit', - 'font_heading_5_category' => '', - 'font_heading_5_variants' => '', - 'heading_5_weight' => 'normal', - 'heading_5_transform' => 'none', - 'heading_5_font_size' => '20', - 'heading_5_line_height' => '', // em. - 'mobile_heading_5_font_size' => '19', - 'font_heading_6' => 'inherit', - 'font_heading_6_category' => '', - 'font_heading_6_variants' => '', - 'heading_6_weight' => 'normal', - 'heading_6_transform' => 'none', - 'heading_6_font_size' => '', - 'heading_6_line_height' => '', // em. - 'font_footer' => 'inherit', - 'font_footer_category' => '', - 'font_footer_variants' => '', - 'footer_weight' => 'normal', - 'footer_transform' => 'none', - 'footer_font_size' => '15', - ); - - if ( $filter ) { - return apply_filters( 'generate_font_option_defaults', $defaults ); - } - - return $defaults; - } -} - -if ( ! function_exists( 'generate_spacing_get_defaults' ) ) { - /** - * Set the default options. - * - * @since 0.1 - * - * @param bool $filter Whether to return the filtered values or original values. - * @return array Option defaults. - */ - function generate_spacing_get_defaults( $filter = true ) { - $defaults = array( - 'top_bar_top' => '10', - 'top_bar_right' => '40', - 'top_bar_bottom' => '10', - 'top_bar_left' => '40', - 'mobile_top_bar_top' => '', - 'mobile_top_bar_right' => '30', - 'mobile_top_bar_bottom' => '', - 'mobile_top_bar_left' => '30', - 'header_top' => '20', - 'header_right' => '40', - 'header_bottom' => '20', - 'header_left' => '40', - 'menu_item' => '20', - 'menu_item_height' => '60', - 'sub_menu_item_height' => '10', - 'sub_menu_width' => '200', - 'content_top' => '40', - 'content_right' => '40', - 'content_bottom' => '40', - 'content_left' => '40', - 'mobile_content_top' => '30', - 'mobile_content_right' => '30', - 'mobile_content_bottom' => '30', - 'mobile_content_left' => '30', - 'separator' => '20', - 'mobile_separator' => '', - 'left_sidebar_width' => '30', - 'right_sidebar_width' => '30', - 'widget_top' => '40', - 'widget_right' => '40', - 'widget_bottom' => '40', - 'widget_left' => '40', - 'footer_widget_container_top' => '40', - 'footer_widget_container_right' => '40', - 'footer_widget_container_bottom' => '40', - 'footer_widget_container_left' => '40', - 'footer_widget_separator' => '40', - 'footer_top' => '20', - 'footer_right' => '40', - 'footer_bottom' => '20', - 'footer_left' => '40', - 'mobile_footer_top' => '', - 'mobile_footer_right' => '30', - 'mobile_footer_bottom' => '', - 'mobile_footer_left' => '30', - ); - - if ( $filter ) { - return apply_filters( 'generate_spacing_option_defaults', $defaults ); - } - - return $defaults; - } -} - -if ( ! function_exists( 'generate_typography_default_fonts' ) ) { - /** - * Set the default system fonts. - * - * @since 1.3.40 - */ - function generate_typography_default_fonts() { - $fonts = array( - 'inherit', - 'System Stack', - 'Arial, Helvetica, sans-serif', - 'Century Gothic', - 'Comic Sans MS', - 'Courier New', - 'Georgia, Times New Roman, Times, serif', - 'Helvetica', - 'Impact', - 'Lucida Console', - 'Lucida Sans Unicode', - 'Palatino Linotype', - 'Segoe UI, Helvetica Neue, Helvetica, sans-serif', - 'Tahoma, Geneva, sans-serif', - 'Trebuchet MS, Helvetica, sans-serif', - 'Verdana, Geneva, sans-serif', - ); - - return apply_filters( 'generate_typography_default_fonts', $fonts ); - } -} + '', + 'hide_tagline' => true, + 'logo' => '', + 'inline_logo_site_branding' => false, + 'retina_logo' => '', + 'logo_width' => '', + 'top_bar_width' => 'full', + 'top_bar_inner_width' => 'contained', + 'top_bar_alignment' => 'right', + 'container_width' => '1200', + 'container_alignment' => 'text', + 'header_layout_setting' => 'fluid-header', + 'header_inner_width' => 'contained', + 'nav_alignment_setting' => is_rtl() ? 'right' : 'left', + 'header_alignment_setting' => is_rtl() ? 'right' : 'left', + 'nav_layout_setting' => 'fluid-nav', + 'nav_inner_width' => 'contained', + 'nav_position_setting' => 'nav-float-right', + 'nav_drop_point' => '', + 'nav_dropdown_type' => 'hover', + 'nav_dropdown_direction' => is_rtl() ? 'left' : 'right', + 'nav_search' => 'disable', + 'content_layout_setting' => 'separate-containers', + 'layout_setting' => 'right-sidebar', + 'blog_layout_setting' => 'right-sidebar', + 'single_layout_setting' => 'right-sidebar', + 'post_content' => 'excerpt', + 'footer_layout_setting' => 'fluid-footer', + 'footer_inner_width' => 'contained', + 'footer_widget_setting' => '3', + 'footer_bar_alignment' => 'right', + 'back_to_top' => '', + 'background_color' => '#f7f8f9', + 'text_color' => '#222222', + 'link_color' => '#1e73be', + 'link_color_hover' => '#000000', + 'link_color_visited' => '', + 'font_awesome_essentials' => true, + 'icons' => 'svg', + 'combine_css' => true, + 'dynamic_css_cache' => true, + 'structure' => 'flexbox', + ) + ); + } +} + +if ( ! function_exists( 'generate_get_color_defaults' ) ) { + /** + * Set default options + */ + function generate_get_color_defaults() { + return apply_filters( + 'generate_color_option_defaults', + array( + 'top_bar_background_color' => '#636363', + 'top_bar_text_color' => '#ffffff', + 'top_bar_link_color' => '#ffffff', + 'top_bar_link_color_hover' => '#303030', + 'header_background_color' => '#ffffff', + 'header_text_color' => '', + 'header_link_color' => '', + 'header_link_hover_color' => '', + 'site_title_color' => '#222222', + 'site_tagline_color' => '#757575', + 'navigation_background_color' => '#ffffff', + 'navigation_text_color' => '#515151', + 'navigation_background_hover_color' => '#ffffff', + 'navigation_text_hover_color' => '#7a8896', + 'navigation_background_current_color' => '#ffffff', + 'navigation_text_current_color' => '#7a8896', + 'subnavigation_background_color' => '#eaeaea', + 'subnavigation_text_color' => '#515151', + 'subnavigation_background_hover_color' => '#eaeaea', + 'subnavigation_text_hover_color' => '#7a8896', + 'subnavigation_background_current_color' => '#eaeaea', + 'subnavigation_text_current_color' => '#7a8896', + 'navigation_search_background_color' => '', + 'navigation_search_text_color' => '', + 'content_background_color' => '#ffffff', + 'content_text_color' => '', + 'content_link_color' => '', + 'content_link_hover_color' => '', + 'content_title_color' => '', + 'blog_post_title_color' => '#222222', + 'blog_post_title_hover_color' => '#55555e', + 'entry_meta_text_color' => '#595959', + 'entry_meta_link_color' => '', + 'entry_meta_link_color_hover' => '', + 'h1_color' => '', + 'h2_color' => '', + 'h3_color' => '', + 'h4_color' => '', + 'h5_color' => '', + 'h6_color' => '', + 'sidebar_widget_background_color' => '#ffffff', + 'sidebar_widget_text_color' => '', + 'sidebar_widget_link_color' => '', + 'sidebar_widget_link_hover_color' => '', + 'sidebar_widget_title_color' => '', + 'footer_widget_background_color' => '#ffffff', + 'footer_widget_text_color' => '', + 'footer_widget_link_color' => '', + 'footer_widget_link_hover_color' => '', + 'footer_widget_title_color' => '#000000', + 'footer_background_color' => '#55555e', + 'footer_text_color' => '#ffffff', + 'footer_link_color' => '#ffffff', + 'footer_link_hover_color' => '#d3d3d3', + 'form_background_color' => '#fafafa', + 'form_text_color' => '#666666', + 'form_background_color_focus' => '#ffffff', + 'form_text_color_focus' => '#666666', + 'form_border_color' => '#cccccc', + 'form_border_color_focus' => '#bfbfbf', + 'form_button_background_color' => '#55555e', + 'form_button_background_color_hover' => '#3f4047', + 'form_button_text_color' => '#ffffff', + 'form_button_text_color_hover' => '#ffffff', + 'back_to_top_background_color' => 'rgba( 0,0,0,0.4 )', + 'back_to_top_background_color_hover' => 'rgba( 0,0,0,0.6 )', + 'back_to_top_text_color' => '#ffffff', + 'back_to_top_text_color_hover' => '#ffffff', + ) + ); + } +} + +if ( ! function_exists( 'generate_get_default_fonts' ) ) { + /** + * Set default options. + * + * @since 0.1 + * + * @param bool $filter Whether to return the filtered values or original values. + * @return array Option defaults. + */ + function generate_get_default_fonts( $filter = true ) { + $defaults = array( + 'font_body' => 'System Stack', + 'font_body_category' => '', + 'font_body_variants' => '', + 'body_font_weight' => 'normal', + 'body_font_transform' => 'none', + 'body_font_size' => '17', + 'body_line_height' => '1.5', // no unit. + 'paragraph_margin' => '1.5', // em. + 'font_top_bar' => 'inherit', + 'font_top_bar_category' => '', + 'font_top_bar_variants' => '', + 'top_bar_font_weight' => 'normal', + 'top_bar_font_transform' => 'none', + 'top_bar_font_size' => '13', + 'font_site_title' => 'inherit', + 'font_site_title_category' => '', + 'font_site_title_variants' => '', + 'site_title_font_weight' => 'bold', + 'site_title_font_transform' => 'none', + 'site_title_font_size' => '25', + 'mobile_site_title_font_size' => '', + 'font_site_tagline' => 'inherit', + 'font_site_tagline_category' => '', + 'font_site_tagline_variants' => '', + 'site_tagline_font_weight' => 'normal', + 'site_tagline_font_transform' => 'none', + 'site_tagline_font_size' => '15', + 'font_navigation' => 'inherit', + 'font_navigation_category' => '', + 'font_navigation_variants' => '', + 'navigation_font_weight' => 'normal', + 'navigation_font_transform' => 'none', + 'navigation_font_size' => '15', + 'font_widget_title' => 'inherit', + 'font_widget_title_category' => '', + 'font_widget_title_variants' => '', + 'widget_title_font_weight' => 'normal', + 'widget_title_font_transform' => 'none', + 'widget_title_font_size' => '20', + 'widget_title_separator' => '30', + 'widget_content_font_size' => '17', + 'font_buttons' => 'inherit', + 'font_buttons_category' => '', + 'font_buttons_variants' => '', + 'buttons_font_weight' => 'normal', + 'buttons_font_transform' => 'none', + 'buttons_font_size' => '', + 'font_heading_1' => 'inherit', + 'font_heading_1_category' => '', + 'font_heading_1_variants' => '', + 'heading_1_weight' => 'normal', + 'heading_1_transform' => 'none', + 'heading_1_font_size' => '42', + 'heading_1_line_height' => '1.2', // em. + 'heading_1_margin_bottom' => '20', + 'mobile_heading_1_font_size' => '31', + 'font_heading_2' => 'inherit', + 'font_heading_2_category' => '', + 'font_heading_2_variants' => '', + 'heading_2_weight' => 'normal', + 'heading_2_transform' => 'none', + 'heading_2_font_size' => '35', + 'heading_2_line_height' => '1.2', // em. + 'heading_2_margin_bottom' => '20', + 'mobile_heading_2_font_size' => '27', + 'font_heading_3' => 'inherit', + 'font_heading_3_category' => '', + 'font_heading_3_variants' => '', + 'heading_3_weight' => 'normal', + 'heading_3_transform' => 'none', + 'heading_3_font_size' => '29', + 'heading_3_line_height' => '1.2', // em. + 'heading_3_margin_bottom' => '20', + 'mobile_heading_3_font_size' => '24', + 'font_heading_4' => 'inherit', + 'font_heading_4_category' => '', + 'font_heading_4_variants' => '', + 'heading_4_weight' => 'normal', + 'heading_4_transform' => 'none', + 'heading_4_font_size' => '24', + 'heading_4_line_height' => '', // em. + 'mobile_heading_4_font_size' => '22', + 'font_heading_5' => 'inherit', + 'font_heading_5_category' => '', + 'font_heading_5_variants' => '', + 'heading_5_weight' => 'normal', + 'heading_5_transform' => 'none', + 'heading_5_font_size' => '20', + 'heading_5_line_height' => '', // em. + 'mobile_heading_5_font_size' => '19', + 'font_heading_6' => 'inherit', + 'font_heading_6_category' => '', + 'font_heading_6_variants' => '', + 'heading_6_weight' => 'normal', + 'heading_6_transform' => 'none', + 'heading_6_font_size' => '', + 'heading_6_line_height' => '', // em. + 'font_footer' => 'inherit', + 'font_footer_category' => '', + 'font_footer_variants' => '', + 'footer_weight' => 'normal', + 'footer_transform' => 'none', + 'footer_font_size' => '15', + ); + + if ( $filter ) { + return apply_filters( 'generate_font_option_defaults', $defaults ); + } + + return $defaults; + } +} + +if ( ! function_exists( 'generate_spacing_get_defaults' ) ) { + /** + * Set the default options. + * + * @since 0.1 + * + * @param bool $filter Whether to return the filtered values or original values. + * @return array Option defaults. + */ + function generate_spacing_get_defaults( $filter = true ) { + $defaults = array( + 'top_bar_top' => '10', + 'top_bar_right' => '40', + 'top_bar_bottom' => '10', + 'top_bar_left' => '40', + 'mobile_top_bar_top' => '', + 'mobile_top_bar_right' => '30', + 'mobile_top_bar_bottom' => '', + 'mobile_top_bar_left' => '30', + 'header_top' => '20', + 'header_right' => '40', + 'header_bottom' => '20', + 'header_left' => '40', + 'menu_item' => '20', + 'menu_item_height' => '60', + 'sub_menu_item_height' => '10', + 'sub_menu_width' => '200', + 'content_top' => '40', + 'content_right' => '40', + 'content_bottom' => '40', + 'content_left' => '40', + 'mobile_content_top' => '30', + 'mobile_content_right' => '30', + 'mobile_content_bottom' => '30', + 'mobile_content_left' => '30', + 'separator' => '20', + 'mobile_separator' => '', + 'left_sidebar_width' => '30', + 'right_sidebar_width' => '30', + 'widget_top' => '40', + 'widget_right' => '40', + 'widget_bottom' => '40', + 'widget_left' => '40', + 'footer_widget_container_top' => '40', + 'footer_widget_container_right' => '40', + 'footer_widget_container_bottom' => '40', + 'footer_widget_container_left' => '40', + 'footer_widget_separator' => '40', + 'footer_top' => '20', + 'footer_right' => '40', + 'footer_bottom' => '20', + 'footer_left' => '40', + 'mobile_footer_top' => '', + 'mobile_footer_right' => '30', + 'mobile_footer_bottom' => '', + 'mobile_footer_left' => '30', + ); + + if ( $filter ) { + return apply_filters( 'generate_spacing_option_defaults', $defaults ); + } + + return $defaults; + } +} + +if ( ! function_exists( 'generate_typography_default_fonts' ) ) { + /** + * Set the default system fonts. + * + * @since 1.3.40 + */ + function generate_typography_default_fonts() { + $fonts = array( + 'inherit', + 'System Stack', + 'Arial, Helvetica, sans-serif', + 'Century Gothic', + 'Comic Sans MS', + 'Courier New', + 'Georgia, Times New Roman, Times, serif', + 'Helvetica', + 'Impact', + 'Lucida Console', + 'Lucida Sans Unicode', + 'Palatino Linotype', + 'Segoe UI, Helvetica Neue, Helvetica, sans-serif', + 'Tahoma, Geneva, sans-serif', + 'Trebuchet MS, Helvetica, sans-serif', + 'Verdana, Geneva, sans-serif', + ); + + return apply_filters( 'generate_typography_default_fonts', $fonts ); + } +} diff --git a/wp-content/themes/generatepress/inc/general.php b/wp-content/themes/generatepress/inc/general.php index d04b1592..ef1574c1 100644 --- a/wp-content/themes/generatepress/inc/general.php +++ b/wp-content/themes/generatepress/inc/general.php @@ -1,436 +1,436 @@ - true, - 'openSubMenuLabel' => esc_attr__( 'Open Sub-Menu', 'generatepress' ), - 'closeSubMenuLabel' => esc_attr__( 'Close Sub-Menu', 'generatepress' ), - ) - ) - ); - - if ( 'click' === generate_get_option( 'nav_dropdown_type' ) || 'click-arrow' === generate_get_option( 'nav_dropdown_type' ) ) { - wp_enqueue_script( 'generate-dropdown-click', $dir_uri . "/assets/js/dropdown-click{$suffix}.js", array(), GENERATE_VERSION, true ); - } - - if ( 'enable' === generate_get_option( 'nav_search' ) ) { - wp_enqueue_script( 'generate-navigation-search', $dir_uri . "/assets/js/navigation-search{$suffix}.js", array(), GENERATE_VERSION, true ); - - wp_localize_script( - 'generate-navigation-search', - 'generatepressNavSearch', - array( - 'open' => esc_attr__( 'Open Search Bar', 'generatepress' ), - 'close' => esc_attr__( 'Close Search Bar', 'generatepress' ), - ) - ); - } - - if ( 'enable' === generate_get_option( 'back_to_top' ) ) { - wp_enqueue_script( 'generate-back-to-top', $dir_uri . "/assets/js/back-to-top{$suffix}.js", array(), GENERATE_VERSION, true ); - } - - if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { - wp_enqueue_script( 'comment-reply' ); - } - } -} - -if ( ! function_exists( 'generate_widgets_init' ) ) { - add_action( 'widgets_init', 'generate_widgets_init' ); - /** - * Register widgetized area and update sidebar with default widgets - */ - function generate_widgets_init() { - $widgets = array( - 'sidebar-1' => __( 'Right Sidebar', 'generatepress' ), - 'sidebar-2' => __( 'Left Sidebar', 'generatepress' ), - 'header' => __( 'Header', 'generatepress' ), - 'footer-1' => __( 'Footer Widget 1', 'generatepress' ), - 'footer-2' => __( 'Footer Widget 2', 'generatepress' ), - 'footer-3' => __( 'Footer Widget 3', 'generatepress' ), - 'footer-4' => __( 'Footer Widget 4', 'generatepress' ), - 'footer-5' => __( 'Footer Widget 5', 'generatepress' ), - 'footer-bar' => __( 'Footer Bar', 'generatepress' ), - 'top-bar' => __( 'Top Bar', 'generatepress' ), - ); - - foreach ( $widgets as $id => $name ) { - register_sidebar( - array( - 'name' => $name, - 'id' => $id, - 'before_widget' => '', - 'before_title' => apply_filters( 'generate_start_widget_title', '

' ), - 'after_title' => apply_filters( 'generate_end_widget_title', '

' ), - ) - ); - } - } -} - -if ( ! function_exists( 'generate_smart_content_width' ) ) { - add_action( 'wp', 'generate_smart_content_width' ); - /** - * Set the $content_width depending on layout of current page - * Hook into "wp" so we have the correct layout setting from generate_get_layout() - * Hooking into "after_setup_theme" doesn't get the correct layout setting - */ - function generate_smart_content_width() { - global $content_width; - - $container_width = generate_get_option( 'container_width' ); - $right_sidebar_width = apply_filters( 'generate_right_sidebar_width', '25' ); - $left_sidebar_width = apply_filters( 'generate_left_sidebar_width', '25' ); - $layout = generate_get_layout(); - - if ( 'left-sidebar' === $layout ) { - $content_width = $container_width * ( ( 100 - $left_sidebar_width ) / 100 ); - } elseif ( 'right-sidebar' === $layout ) { - $content_width = $container_width * ( ( 100 - $right_sidebar_width ) / 100 ); - } elseif ( 'no-sidebar' === $layout ) { - $content_width = $container_width; - } else { - $content_width = $container_width * ( ( 100 - ( $left_sidebar_width + $right_sidebar_width ) ) / 100 ); - } - } -} - -if ( ! function_exists( 'generate_page_menu_args' ) ) { - add_filter( 'wp_page_menu_args', 'generate_page_menu_args' ); - /** - * Get our wp_nav_menu() fallback, wp_page_menu(), to show a home link. - * - * @since 0.1 - * - * @param array $args The existing menu args. - * @return array Menu args. - */ - function generate_page_menu_args( $args ) { - $args['show_home'] = true; - - return $args; - } -} - -if ( ! function_exists( 'generate_disable_title' ) ) { - add_filter( 'generate_show_title', 'generate_disable_title' ); - /** - * Remove our title if set. - * - * @since 1.3.18 - * - * @param bool $title Whether the title is displayed or not. - * @return bool Whether to display the content title. - */ - function generate_disable_title( $title ) { - if ( is_singular() ) { - $disable_title = get_post_meta( get_the_ID(), '_generate-disable-headline', true ); - - if ( $disable_title ) { - $title = false; - } - } - - return $title; - } -} - -if ( ! function_exists( 'generate_resource_hints' ) ) { - add_filter( 'wp_resource_hints', 'generate_resource_hints', 10, 2 ); - /** - * Add resource hints to our Google fonts call. - * - * @since 1.3.42 - * - * @param array $urls URLs to print for resource hints. - * @param string $relation_type The relation type the URLs are printed. - * @return array $urls URLs to print for resource hints. - */ - function generate_resource_hints( $urls, $relation_type ) { - if ( wp_style_is( 'generate-fonts', 'queue' ) && 'preconnect' === $relation_type ) { - if ( version_compare( $GLOBALS['wp_version'], '4.7-alpha', '>=' ) ) { - $urls[] = array( - 'href' => 'https://fonts.gstatic.com', - 'crossorigin', - ); - } else { - $urls[] = 'https://fonts.gstatic.com'; - } - } - - return $urls; - } -} - -if ( ! function_exists( 'generate_remove_caption_padding' ) ) { - add_filter( 'img_caption_shortcode_width', 'generate_remove_caption_padding' ); - /** - * Remove WordPress's default padding on images with captions - * - * @param int $width Default WP .wp-caption width (image width + 10px). - * @return int Updated width to remove 10px padding. - */ - function generate_remove_caption_padding( $width ) { - return $width - 10; - } -} - -if ( ! function_exists( 'generate_enhanced_image_navigation' ) ) { - add_filter( 'attachment_link', 'generate_enhanced_image_navigation', 10, 2 ); - /** - * Filter in a link to a content ID attribute for the next/previous image links on image attachment pages. - * - * @param string $url The input URL. - * @param int $id The ID of the post. - */ - function generate_enhanced_image_navigation( $url, $id ) { - if ( ! is_attachment() && ! wp_attachment_is_image( $id ) ) { - return $url; - } - - $image = get_post( $id ); - // phpcs:ignore WordPress.PHP.StrictComparisons.LooseComparison -- Intentially loose. - if ( ! empty( $image->post_parent ) && $image->post_parent != $id ) { - $url .= '#main'; - } - - return $url; - } -} - -if ( ! function_exists( 'generate_categorized_blog' ) ) { - /** - * Determine whether blog/site has more than one category. - * - * @since 1.2.5 - * - * @return bool True of there is more than one category, false otherwise. - */ - function generate_categorized_blog() { - if ( false === ( $all_the_cool_cats = get_transient( 'generate_categories' ) ) ) { // phpcs:ignore - // Create an array of all the categories that are attached to posts. - $all_the_cool_cats = get_categories( - array( - 'fields' => 'ids', - 'hide_empty' => 1, - - // We only need to know if there is more than one category. - 'number' => 2, - ) - ); - - // Count the number of categories that are attached to the posts. - $all_the_cool_cats = count( $all_the_cool_cats ); - - set_transient( 'generate_categories', $all_the_cool_cats ); - } - - if ( $all_the_cool_cats > 1 ) { - // This blog has more than 1 category so twentyfifteen_categorized_blog should return true. - return true; - } else { - // This blog has only 1 category so twentyfifteen_categorized_blog should return false. - return false; - } - } -} - -if ( ! function_exists( 'generate_category_transient_flusher' ) ) { - add_action( 'edit_category', 'generate_category_transient_flusher' ); - add_action( 'save_post', 'generate_category_transient_flusher' ); - /** - * Flush out the transients used in {@see generate_categorized_blog()}. - * - * @since 1.2.5 - */ - function generate_category_transient_flusher() { - // Like, beat it. Dig? - delete_transient( 'generate_categories' ); - } -} - -if ( ! function_exists( 'generate_get_default_color_palettes' ) ) { - /** - * Set up our colors for the color picker palettes and filter them so you can change them. - * - * @since 1.3.42 - */ - function generate_get_default_color_palettes() { - $palettes = array( - '#000000', - '#FFFFFF', - '#F1C40F', - '#E74C3C', - '#1ABC9C', - '#1e72bd', - '#8E44AD', - '#00CC77', - ); - - return apply_filters( 'generate_default_color_palettes', $palettes ); - } -} - -add_filter( 'generate_fontawesome_essentials', 'generate_set_font_awesome_essentials' ); -/** - * Check to see if we should include the full Font Awesome library or not. - * - * @since 2.0 - * - * @param bool $essentials The existing value. - * @return bool - */ -function generate_set_font_awesome_essentials( $essentials ) { - if ( generate_get_option( 'font_awesome_essentials' ) ) { - return true; - } - - return $essentials; -} - -add_filter( 'generate_dynamic_css_skip_cache', 'generate_skip_dynamic_css_cache' ); -/** - * Skips caching of the dynamic CSS if set to false. - * - * @since 2.0 - * - * @param bool $cache The existing value. - * @return bool - */ -function generate_skip_dynamic_css_cache( $cache ) { - if ( ! generate_get_option( 'dynamic_css_cache' ) ) { - return true; - } - - return $cache; -} - -add_filter( 'wp_headers', 'generate_set_wp_headers' ); -/** - * Set any necessary headers. - * - * @param array $headers The existing headers. - * - * @since 2.3 - */ -function generate_set_wp_headers( $headers ) { - $headers['X-UA-Compatible'] = 'IE=edge'; - - return $headers; -} - -add_filter( 'generate_after_element_class_attribute', 'generate_set_microdata_markup', 10, 2 ); -/** - * Adds microdata to elements. - * - * @since 3.0.0 - * @param string $output The existing output after the class attribute. - * @param string $context What element we're targeting. - */ -function generate_set_microdata_markup( $output, $context ) { - if ( 'left_sidebar' === $context || 'right_sidebar' === $context ) { - $context = 'sidebar'; - } - - if ( 'footer' === $context ) { - return $output; - } - - if ( 'site-info' === $context ) { - $context = 'footer'; - } - - $microdata = generate_get_microdata( $context ); - - if ( $microdata ) { - return $microdata; - } - - return $output; -} + true, + 'openSubMenuLabel' => esc_attr__( 'Open Sub-Menu', 'generatepress' ), + 'closeSubMenuLabel' => esc_attr__( 'Close Sub-Menu', 'generatepress' ), + ) + ) + ); + + if ( 'click' === generate_get_option( 'nav_dropdown_type' ) || 'click-arrow' === generate_get_option( 'nav_dropdown_type' ) ) { + wp_enqueue_script( 'generate-dropdown-click', $dir_uri . "/assets/js/dropdown-click{$suffix}.js", array(), GENERATE_VERSION, true ); + } + + if ( 'enable' === generate_get_option( 'nav_search' ) ) { + wp_enqueue_script( 'generate-navigation-search', $dir_uri . "/assets/js/navigation-search{$suffix}.js", array(), GENERATE_VERSION, true ); + + wp_localize_script( + 'generate-navigation-search', + 'generatepressNavSearch', + array( + 'open' => esc_attr__( 'Open Search Bar', 'generatepress' ), + 'close' => esc_attr__( 'Close Search Bar', 'generatepress' ), + ) + ); + } + + if ( 'enable' === generate_get_option( 'back_to_top' ) ) { + wp_enqueue_script( 'generate-back-to-top', $dir_uri . "/assets/js/back-to-top{$suffix}.js", array(), GENERATE_VERSION, true ); + } + + if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { + wp_enqueue_script( 'comment-reply' ); + } + } +} + +if ( ! function_exists( 'generate_widgets_init' ) ) { + add_action( 'widgets_init', 'generate_widgets_init' ); + /** + * Register widgetized area and update sidebar with default widgets + */ + function generate_widgets_init() { + $widgets = array( + 'sidebar-1' => __( 'Right Sidebar', 'generatepress' ), + 'sidebar-2' => __( 'Left Sidebar', 'generatepress' ), + 'header' => __( 'Header', 'generatepress' ), + 'footer-1' => __( 'Footer Widget 1', 'generatepress' ), + 'footer-2' => __( 'Footer Widget 2', 'generatepress' ), + 'footer-3' => __( 'Footer Widget 3', 'generatepress' ), + 'footer-4' => __( 'Footer Widget 4', 'generatepress' ), + 'footer-5' => __( 'Footer Widget 5', 'generatepress' ), + 'footer-bar' => __( 'Footer Bar', 'generatepress' ), + 'top-bar' => __( 'Top Bar', 'generatepress' ), + ); + + foreach ( $widgets as $id => $name ) { + register_sidebar( + array( + 'name' => $name, + 'id' => $id, + 'before_widget' => '', + 'before_title' => apply_filters( 'generate_start_widget_title', '

' ), + 'after_title' => apply_filters( 'generate_end_widget_title', '

' ), + ) + ); + } + } +} + +if ( ! function_exists( 'generate_smart_content_width' ) ) { + add_action( 'wp', 'generate_smart_content_width' ); + /** + * Set the $content_width depending on layout of current page + * Hook into "wp" so we have the correct layout setting from generate_get_layout() + * Hooking into "after_setup_theme" doesn't get the correct layout setting + */ + function generate_smart_content_width() { + global $content_width; + + $container_width = generate_get_option( 'container_width' ); + $right_sidebar_width = apply_filters( 'generate_right_sidebar_width', '25' ); + $left_sidebar_width = apply_filters( 'generate_left_sidebar_width', '25' ); + $layout = generate_get_layout(); + + if ( 'left-sidebar' === $layout ) { + $content_width = $container_width * ( ( 100 - $left_sidebar_width ) / 100 ); + } elseif ( 'right-sidebar' === $layout ) { + $content_width = $container_width * ( ( 100 - $right_sidebar_width ) / 100 ); + } elseif ( 'no-sidebar' === $layout ) { + $content_width = $container_width; + } else { + $content_width = $container_width * ( ( 100 - ( $left_sidebar_width + $right_sidebar_width ) ) / 100 ); + } + } +} + +if ( ! function_exists( 'generate_page_menu_args' ) ) { + add_filter( 'wp_page_menu_args', 'generate_page_menu_args' ); + /** + * Get our wp_nav_menu() fallback, wp_page_menu(), to show a home link. + * + * @since 0.1 + * + * @param array $args The existing menu args. + * @return array Menu args. + */ + function generate_page_menu_args( $args ) { + $args['show_home'] = true; + + return $args; + } +} + +if ( ! function_exists( 'generate_disable_title' ) ) { + add_filter( 'generate_show_title', 'generate_disable_title' ); + /** + * Remove our title if set. + * + * @since 1.3.18 + * + * @param bool $title Whether the title is displayed or not. + * @return bool Whether to display the content title. + */ + function generate_disable_title( $title ) { + if ( is_singular() ) { + $disable_title = get_post_meta( get_the_ID(), '_generate-disable-headline', true ); + + if ( $disable_title ) { + $title = false; + } + } + + return $title; + } +} + +if ( ! function_exists( 'generate_resource_hints' ) ) { + add_filter( 'wp_resource_hints', 'generate_resource_hints', 10, 2 ); + /** + * Add resource hints to our Google fonts call. + * + * @since 1.3.42 + * + * @param array $urls URLs to print for resource hints. + * @param string $relation_type The relation type the URLs are printed. + * @return array $urls URLs to print for resource hints. + */ + function generate_resource_hints( $urls, $relation_type ) { + if ( wp_style_is( 'generate-fonts', 'queue' ) && 'preconnect' === $relation_type ) { + if ( version_compare( $GLOBALS['wp_version'], '4.7-alpha', '>=' ) ) { + $urls[] = array( + 'href' => 'https://fonts.gstatic.com', + 'crossorigin', + ); + } else { + $urls[] = 'https://fonts.gstatic.com'; + } + } + + return $urls; + } +} + +if ( ! function_exists( 'generate_remove_caption_padding' ) ) { + add_filter( 'img_caption_shortcode_width', 'generate_remove_caption_padding' ); + /** + * Remove WordPress's default padding on images with captions + * + * @param int $width Default WP .wp-caption width (image width + 10px). + * @return int Updated width to remove 10px padding. + */ + function generate_remove_caption_padding( $width ) { + return $width - 10; + } +} + +if ( ! function_exists( 'generate_enhanced_image_navigation' ) ) { + add_filter( 'attachment_link', 'generate_enhanced_image_navigation', 10, 2 ); + /** + * Filter in a link to a content ID attribute for the next/previous image links on image attachment pages. + * + * @param string $url The input URL. + * @param int $id The ID of the post. + */ + function generate_enhanced_image_navigation( $url, $id ) { + if ( ! is_attachment() && ! wp_attachment_is_image( $id ) ) { + return $url; + } + + $image = get_post( $id ); + // phpcs:ignore WordPress.PHP.StrictComparisons.LooseComparison -- Intentially loose. + if ( ! empty( $image->post_parent ) && $image->post_parent != $id ) { + $url .= '#main'; + } + + return $url; + } +} + +if ( ! function_exists( 'generate_categorized_blog' ) ) { + /** + * Determine whether blog/site has more than one category. + * + * @since 1.2.5 + * + * @return bool True of there is more than one category, false otherwise. + */ + function generate_categorized_blog() { + if ( false === ( $all_the_cool_cats = get_transient( 'generate_categories' ) ) ) { // phpcs:ignore + // Create an array of all the categories that are attached to posts. + $all_the_cool_cats = get_categories( + array( + 'fields' => 'ids', + 'hide_empty' => 1, + + // We only need to know if there is more than one category. + 'number' => 2, + ) + ); + + // Count the number of categories that are attached to the posts. + $all_the_cool_cats = count( $all_the_cool_cats ); + + set_transient( 'generate_categories', $all_the_cool_cats ); + } + + if ( $all_the_cool_cats > 1 ) { + // This blog has more than 1 category so twentyfifteen_categorized_blog should return true. + return true; + } else { + // This blog has only 1 category so twentyfifteen_categorized_blog should return false. + return false; + } + } +} + +if ( ! function_exists( 'generate_category_transient_flusher' ) ) { + add_action( 'edit_category', 'generate_category_transient_flusher' ); + add_action( 'save_post', 'generate_category_transient_flusher' ); + /** + * Flush out the transients used in {@see generate_categorized_blog()}. + * + * @since 1.2.5 + */ + function generate_category_transient_flusher() { + // Like, beat it. Dig? + delete_transient( 'generate_categories' ); + } +} + +if ( ! function_exists( 'generate_get_default_color_palettes' ) ) { + /** + * Set up our colors for the color picker palettes and filter them so you can change them. + * + * @since 1.3.42 + */ + function generate_get_default_color_palettes() { + $palettes = array( + '#000000', + '#FFFFFF', + '#F1C40F', + '#E74C3C', + '#1ABC9C', + '#1e72bd', + '#8E44AD', + '#00CC77', + ); + + return apply_filters( 'generate_default_color_palettes', $palettes ); + } +} + +add_filter( 'generate_fontawesome_essentials', 'generate_set_font_awesome_essentials' ); +/** + * Check to see if we should include the full Font Awesome library or not. + * + * @since 2.0 + * + * @param bool $essentials The existing value. + * @return bool + */ +function generate_set_font_awesome_essentials( $essentials ) { + if ( generate_get_option( 'font_awesome_essentials' ) ) { + return true; + } + + return $essentials; +} + +add_filter( 'generate_dynamic_css_skip_cache', 'generate_skip_dynamic_css_cache' ); +/** + * Skips caching of the dynamic CSS if set to false. + * + * @since 2.0 + * + * @param bool $cache The existing value. + * @return bool + */ +function generate_skip_dynamic_css_cache( $cache ) { + if ( ! generate_get_option( 'dynamic_css_cache' ) ) { + return true; + } + + return $cache; +} + +add_filter( 'wp_headers', 'generate_set_wp_headers' ); +/** + * Set any necessary headers. + * + * @param array $headers The existing headers. + * + * @since 2.3 + */ +function generate_set_wp_headers( $headers ) { + $headers['X-UA-Compatible'] = 'IE=edge'; + + return $headers; +} + +add_filter( 'generate_after_element_class_attribute', 'generate_set_microdata_markup', 10, 2 ); +/** + * Adds microdata to elements. + * + * @since 3.0.0 + * @param string $output The existing output after the class attribute. + * @param string $context What element we're targeting. + */ +function generate_set_microdata_markup( $output, $context ) { + if ( 'left_sidebar' === $context || 'right_sidebar' === $context ) { + $context = 'sidebar'; + } + + if ( 'footer' === $context ) { + return $output; + } + + if ( 'site-info' === $context ) { + $context = 'footer'; + } + + $microdata = generate_get_microdata( $context ); + + if ( $microdata ) { + return $microdata; + } + + return $output; +} diff --git a/wp-content/themes/generatepress/inc/plugin-compat.php b/wp-content/themes/generatepress/inc/plugin-compat.php index b2736277..f1d1c4b5 100644 --- a/wp-content/themes/generatepress/inc/plugin-compat.php +++ b/wp-content/themes/generatepress/inc/plugin-compat.php @@ -1,827 +1,827 @@ - -
> -
> - -
> -
- -
> - -
- -
-
- -
-
- post_date ); - if ( $post_date < $compare_date ) { - $css = '.fl-builder.no-sidebar .container.grid-container { - max-width: 100%; - } - - .fl-builder.one-container.no-sidebar .site-content { - padding:0; - }'; - $css = str_replace( array( "\r", "\n", "\t" ), '', $css ); - wp_add_inline_style( 'generate-style', $css ); - } - } - } -} - -add_action( 'wp_enqueue_scripts', 'generate_do_third_party_plugin_css', 50 ); -/** - * Add CSS for third-party plugins. - * - * @since 3.0.1 - */ -function generate_do_third_party_plugin_css() { - $css = new GeneratePress_CSS(); - - if ( generate_is_using_flexbox() && class_exists( 'Elementor\Plugin' ) ) { - $css->set_selector( '.elementor-template-full-width .site-content' ); - $css->add_property( 'display', 'block' ); - } - - if ( $css->css_output() ) { - wp_add_inline_style( 'generate-style', $css->css_output() ); - } -} - -add_action( 'wp_enqueue_scripts', 'generate_do_pro_compatibility', 50 ); -/** - * Add CSS to ensure compatibility with GP Premium. - * - * @since 3.0.0 - */ -function generate_do_pro_compatibility() { - if ( ! defined( 'GP_PREMIUM_VERSION' ) ) { - return; - } - - $css = new GeneratePress_CSS(); - - if ( version_compare( GP_PREMIUM_VERSION, '1.11.0-alpha.1', '<' ) ) { - if ( generate_is_using_flexbox() && defined( 'GENERATE_SECONDARY_NAV_VERSION' ) ) { - $css->set_selector( '.secondary-navigation .inside-navigation:before, .secondary-navigation .inside-navigation:after' ); - $css->add_property( 'content', '"."' ); - $css->add_property( 'display', 'block' ); - $css->add_property( 'overflow', 'hidden' ); - $css->add_property( 'visibility', 'hidden' ); - $css->add_property( 'font-size', '0px' ); - $css->add_property( 'line-height', '0px' ); - $css->add_property( 'width', '0px' ); - $css->add_property( 'height', '0px' ); - - $css->set_selector( '.secondary-navigation .inside-navigation:after' ); - $css->add_property( 'clear', 'both' ); - } - } - - if ( version_compare( GP_PREMIUM_VERSION, '1.12.0-alpha.1', '<' ) ) { - if ( defined( 'GENERATE_MENU_PLUS_VERSION' ) && function_exists( 'generate_menu_plus_get_defaults' ) ) { - $menu_plus_settings = wp_parse_args( - get_option( 'generate_menu_plus_settings', array() ), - generate_menu_plus_get_defaults() - ); - - if ( generate_is_using_flexbox() && ( 'true' === $menu_plus_settings['sticky_menu'] || 'desktop' === $menu_plus_settings['sticky_menu'] || 'mobile' === $menu_plus_settings['sticky_menu'] || 'enable' === $menu_plus_settings['mobile_header_sticky'] ) ) { - if ( generate_has_inline_mobile_toggle() ) { - $css->start_media_query( generate_get_media_query( 'mobile-menu' ) ); - - $css->set_selector( '#sticky-placeholder' ); - $css->add_property( 'height', '0' ); - $css->add_property( 'overflow', 'hidden' ); - - $css->set_selector( '.has-inline-mobile-toggle #site-navigation.toggled' ); - $css->add_property( 'margin-top', '0' ); - - $css->set_selector( '.has-inline-mobile-menu #site-navigation.toggled .main-nav > ul' ); - $css->add_property( 'top', '1.5em' ); - - $css->stop_media_query(); - } - - if ( 'desktop' === $menu_plus_settings['sticky_menu'] ) { - $css->set_selector( '.sticky-enabled .gen-sidebar-nav.is_stuck .main-navigation' ); - $css->add_property( 'margin-bottom', '0' ); - - $css->set_selector( '.sticky-enabled .gen-sidebar-nav.is_stuck' ); - $css->add_property( 'z-index', '500' ); - - $css->set_selector( '.sticky-enabled .main-navigation.is_stuck' ); - $css->add_property( 'box-shadow', '0 2px 2px -2px rgba(0, 0, 0, .2)' ); - - $css->set_selector( '.navigation-stick:not(.gen-sidebar-nav)' ); - $css->add_property( 'left', '0' ); - $css->add_property( 'right', '0' ); - $css->add_property( 'width', '100% !important' ); - - $css->set_selector( '.both-sticky-menu .main-navigation:not(#mobile-header).toggled .main-nav > ul,.mobile-sticky-menu .main-navigation:not(#mobile-header).toggled .main-nav > ul,.mobile-header-sticky #mobile-header.toggled .main-nav > ul' ); - $css->add_property( 'position', 'absolute' ); - $css->add_property( 'left', '0' ); - $css->add_property( 'right', '0' ); - $css->add_property( 'z-index', '999' ); - } - - $css->set_selector( '.nav-float-right .navigation-stick' ); - $css->add_property( 'width', '100% !important' ); - $css->add_property( 'left', '0' ); - - $css->set_selector( '.nav-float-right .navigation-stick .navigation-branding' ); - $css->add_property( 'margin-right', 'auto' ); - - if ( ! $menu_plus_settings['navigation_as_header'] ) { - $header_left = 40; - $header_right = 40; - $mobile_header_left = 30; - $mobile_header_right = 30; - - if ( function_exists( 'generate_spacing_get_defaults' ) ) { - $spacing_settings = wp_parse_args( - get_option( 'generate_spacing_settings', array() ), - generate_spacing_get_defaults() - ); - - $header_left = $spacing_settings['header_left']; - $header_right = $spacing_settings['header_right']; - $mobile_header_left = $spacing_settings['mobile_header_left']; - $mobile_header_right = $spacing_settings['mobile_header_right']; - } - - if ( function_exists( 'generate_is_using_flexbox' ) && generate_is_using_flexbox() ) { - if ( function_exists( 'generate_get_option' ) && 'text' === generate_get_option( 'container_alignment' ) ) { - $css->set_selector( '.main-navigation.navigation-stick .inside-navigation.grid-container' ); - $css->add_property( 'padding-left', $header_left, false, 'px' ); - $css->add_property( 'padding-right', $header_right, false, 'px' ); - - $css->start_media_query( generate_get_media_query( 'mobile-menu' ) ); - $css->set_selector( '.main-navigation.navigation-stick .inside-navigation.grid-container' ); - $css->add_property( 'padding-left', $mobile_header_left, false, 'px' ); - $css->add_property( 'padding-right', $mobile_header_right, false, 'px' ); - $css->stop_media_query(); - } - } - } - - $css->set_selector( '.nav-float-right .main-navigation.has-branding:not([class*="nav-align-"]):not(.mobile-header-navigation) .menu-bar-items,.nav-float-right .main-navigation.has-sticky-branding.navigation-stick:not([class*="nav-align-"]):not(.mobile-header-navigation) .menu-bar-items' ); - $css->add_property( 'margin-left', '0' ); - } - - if ( generate_has_inline_mobile_toggle() && 'false' !== $menu_plus_settings['slideout_menu'] ) { - $css->set_selector( '.slideout-mobile .has-inline-mobile-toggle #site-navigation.toggled,.slideout-both .has-inline-mobile-toggle #site-navigation.toggled' ); - $css->add_property( 'margin-top', '0' ); - } - - if ( 'font' === generate_get_option( 'icons' ) ) { - $css->set_selector( '.main-navigation .slideout-toggle a:before,.slide-opened .slideout-overlay .slideout-exit:before' ); - $css->add_property( 'font-family', 'GeneratePress' ); - - $css->set_selector( '.slideout-navigation .dropdown-menu-toggle:before' ); - $css->add_property( 'content', '"\f107" !important' ); - - $css->set_selector( '.slideout-navigation .sfHover > a .dropdown-menu-toggle:before' ); - $css->add_property( 'content', '"\f106" !important' ); - } - - if ( generate_is_using_flexbox() && $menu_plus_settings['navigation_as_header'] ) { - $content_left = 40; - $content_right = 40; - - if ( function_exists( 'generate_spacing_get_defaults' ) ) { - $spacing_settings = wp_parse_args( - get_option( 'generate_spacing_settings', array() ), - generate_spacing_get_defaults() - ); - - $content_left = $spacing_settings['content_left']; - $content_right = $spacing_settings['content_right']; - } - - if ( 'text' === generate_get_option( 'container_alignment' ) ) { - $css->set_selector( '.main-navigation.has-branding .inside-navigation.grid-container, .main-navigation.has-branding .inside-navigation.grid-container' ); - $css->add_property( 'padding', generate_padding_css( 0, $content_right, 0, $content_left ) ); - } - - $css->set_selector( '.navigation-branding' ); - $css->add_property( 'margin-left', '10px' ); - - $css->set_selector( '.navigation-branding .main-title, .mobile-header-navigation .site-logo' ); - $css->add_property( 'margin-left', '10px' ); - - if ( is_rtl() ) { - $css->set_selector( '.navigation-branding' ); - $css->add_property( 'margin-left', 'auto' ); - $css->add_property( 'margin-right', '10px' ); - - $css->set_selector( '.navigation-branding .main-title, .mobile-header-navigation .site-logo' ); - $css->add_property( 'margin-right', '10px' ); - $css->add_property( 'margin-left', '0' ); - } - - $css->set_selector( '.navigation-branding > div + .main-title' ); - $css->add_property( 'margin-left', '10px' ); - - if ( is_rtl() ) { - $css->set_selector( '.navigation-branding > div + .main-title' ); - $css->add_property( 'margin-right', '10px' ); - } - - $css->set_selector( '.has-branding .navigation-branding img' ); - $css->add_property( 'margin', '0' ); - - $css->start_media_query( generate_get_media_query( 'mobile-menu' ) ); - if ( 'text' === generate_get_option( 'container_alignment' ) ) { - $css->set_selector( '.main-navigation.has-branding .inside-navigation.grid-container' ); - $css->add_property( 'padding', '0' ); - } - $css->stop_media_query(); - } - } - - if ( defined( 'GENERATE_SPACING_VERSION' ) ) { - if ( generate_is_using_flexbox() ) { - $css->set_selector( '#footer-widgets, .site-info' ); - $css->add_property( 'padding', '0' ); - } - } - - if ( defined( 'GENERATE_SECONDARY_NAV_VERSION' ) ) { - if ( generate_is_using_flexbox() && has_nav_menu( 'secondary' ) ) { - if ( 'text' === generate_get_option( 'container_alignment' ) && function_exists( 'generate_secondary_nav_get_defaults' ) ) { - $secondary_nav_settings = wp_parse_args( - get_option( 'generate_secondary_nav_settings', array() ), - generate_secondary_nav_get_defaults() - ); - - $spacing_settings = wp_parse_args( - get_option( 'generate_spacing_settings', array() ), - generate_spacing_get_defaults() - ); - - $navigation_left_padding = absint( $spacing_settings['header_left'] ) - absint( $secondary_nav_settings['secondary_menu_item'] ); - $navigation_right_padding = absint( $spacing_settings['header_right'] ) - absint( $secondary_nav_settings['secondary_menu_item'] ); - - $css->set_selector( '.secondary-nav-below-header .secondary-navigation .inside-navigation.grid-container, .secondary-nav-above-header .secondary-navigation .inside-navigation.grid-container' ); - $css->add_property( 'padding', generate_padding_css( 0, $navigation_right_padding, 0, $navigation_left_padding ) ); - } - } - } - - if ( generate_is_using_flexbox() && defined( 'GENERATE_FONT_VERSION' ) && function_exists( 'generate_get_default_fonts' ) ) { - $font_settings = wp_parse_args( - get_option( 'generate_settings', array() ), - generate_get_default_fonts() - ); - - if ( isset( $font_settings['tablet_navigation_font_size'] ) && '' !== $font_settings['tablet_navigation_font_size'] ) { - $css->start_media_query( generate_get_media_query( 'tablet' ) ); - $css->set_selector( '.main-navigation .menu-toggle' ); - $css->add_property( 'font-size', absint( $font_settings['tablet_navigation_font_size'] ), false, 'px' ); - $css->stop_media_query(); - } - - if ( isset( $font_settings['mobile_navigation_font_size'] ) && '' !== $font_settings['mobile_navigation_font_size'] ) { - $css->start_media_query( generate_get_media_query( 'mobile-menu' ) ); - $css->set_selector( '.main-navigation .menu-toggle' ); - $css->add_property( 'font-size', absint( $font_settings['mobile_navigation_font_size'] ), false, 'px' ); - $css->stop_media_query(); - } - } - - if ( ! generate_show_title() ) { - $css->set_selector( '.page .entry-content' )->add_property( 'margin-top', '0px' ); - - if ( is_single() ) { - if ( ! apply_filters( 'generate_post_author', true ) && ! apply_filters( 'generate_post_date', true ) ) { - $css->set_selector( '.single .entry-content' )->add_property( 'margin-top', '0' ); - } - } - } - } - - if ( $css->css_output() ) { - wp_add_inline_style( 'generate-style', $css->css_output() ); - } -} - -add_filter( 'generate_menu_item_dropdown_arrow_direction', 'generate_set_pro_menu_item_arrow_directions', 10, 3 ); -/** - * Set the menu item arrow directions for Secondary and Slideout navs. - * - * @since 3.0.0 - * @param string $arrow_direction The current direction. - * @param object $args The args for the current menu. - * @param int $depth The current depth of the menu item. - */ -function generate_set_pro_menu_item_arrow_directions( $arrow_direction, $args, $depth ) { - if ( function_exists( 'generate_secondary_nav_get_defaults' ) && 'secondary' === $args->theme_location ) { - $settings = wp_parse_args( - get_option( 'generate_secondary_nav_settings', array() ), - generate_secondary_nav_get_defaults() - ); - - if ( 0 !== $depth ) { - $arrow_direction = 'right'; - - if ( 'left' === $settings['secondary_nav_dropdown_direction'] ) { - $arrow_direction = 'left'; - } - } - - if ( 'secondary-nav-left-sidebar' === $settings['secondary_nav_position_setting'] ) { - $arrow_direction = 'right'; - - if ( 'both-right' === generate_get_layout() ) { - $arrow_direction = 'left'; - } - } - - if ( 'secondary-nav-right-sidebar' === $settings['secondary_nav_position_setting'] ) { - $arrow_direction = 'left'; - - if ( 'both-left' === generate_get_layout() ) { - $arrow_direction = 'right'; - } - } - - if ( 'hover' !== generate_get_option( 'nav_dropdown_type' ) ) { - $arrow_direction = 'down'; - } - } - - return $arrow_direction; -} - -add_filter( 'generate_menu_plus_option_defaults', 'generate_set_menu_plus_compat_defaults' ); -/** - * Set defaults in our pro Menu Plus module. - * - * @since 3.0.0 - * @param array $defaults The existing defaults. - */ -function generate_set_menu_plus_compat_defaults( $defaults ) { - if ( generate_has_inline_mobile_toggle() ) { - $defaults['mobile_menu_label'] = ''; - } - - return $defaults; -} - -add_filter( 'generate_spacing_option_defaults', 'generate_set_spacing_compat_defaults', 20 ); -/** - * Set defaults in our pro Spacing module. - * - * @since 3.0.0 - * @param array $defaults The existing defaults. - */ -function generate_set_spacing_compat_defaults( $defaults ) { - $defaults['mobile_header_top'] = ''; - $defaults['mobile_header_bottom'] = ''; - $defaults['mobile_header_right'] = '30'; - $defaults['mobile_header_left'] = '30'; - - $defaults['mobile_widget_top'] = '30'; - $defaults['mobile_widget_right'] = '30'; - $defaults['mobile_widget_bottom'] = '30'; - $defaults['mobile_widget_left'] = '30'; - - $defaults['mobile_footer_widget_container_top'] = '30'; - $defaults['mobile_footer_widget_container_right'] = '30'; - $defaults['mobile_footer_widget_container_bottom'] = '30'; - $defaults['mobile_footer_widget_container_left'] = '30'; - - return $defaults; -} - -add_filter( 'generate_page_hero_css_output', 'generate_do_pro_page_hero_css', 10, 2 ); -/** - * Add CSS to our premium Page Heroes. - * - * @since 3.0.0 - * @param string $css_output Existing CSS. - * @param array $options The Header Element options. - */ -function generate_do_pro_page_hero_css( $css_output, $options ) { - if ( ! defined( 'GP_PREMIUM_VERSION' ) ) { - return $css_output; - } - - $new_css = ''; - - if ( version_compare( GP_PREMIUM_VERSION, '1.12.0-alpha.1', '<' ) ) { - $css = new GeneratePress_CSS(); - - $padding_inside = false; - - if ( generate_is_using_flexbox() && 'text' === generate_get_option( 'container_alignment' ) ) { - $padding_inside = true; - } - - if ( $padding_inside ) { - $container_width = generate_get_option( 'container_width' ); - $padding_right = '0px'; - $padding_left = '0px'; - - if ( $options['padding_right'] ) { - $padding_right = absint( $options['padding_right'] ) . $options['padding_right_unit']; - } - - if ( $options['padding_left'] ) { - $padding_left = absint( $options['padding_left'] ) . $options['padding_left_unit']; - } - - $css->set_selector( '.page-hero .inside-page-hero.grid-container' ); - - $css->add_property( - 'max-width', - sprintf( - 'calc(%1$s - %2$s - %3$s)', - $container_width . 'px', - $padding_right, - $padding_left - ) - ); - } - - if ( generate_is_using_flexbox() && '' !== $options['site_header_merge'] ) { - if ( 'merge-desktop' === $options['site_header_merge'] ) { - $css->start_media_query( apply_filters( 'generate_not_mobile_media_query', '(min-width: 769px)' ) ); - } - - if ( $options['navigation_colors'] ) { - $navigation_background = $options['navigation_background_color'] ? $options['navigation_background_color'] : 'transparent'; - $navigation_background_hover = $options['navigation_background_color_hover'] ? $options['navigation_background_color_hover'] : 'transparent'; - - $css->set_selector( '.header-wrap #site-navigation:not(.toggled), .header-wrap #mobile-header:not(.toggled):not(.navigation-stick), .has-inline-mobile-toggle .mobile-menu-control-wrapper' ); - $css->add_property( 'background', $navigation_background ); - - $css->set_selector( '.main-navigation:not(.toggled):not(.navigation-stick) .menu-bar-item:not(.close-search) > a' ); - $css->add_property( 'color', esc_attr( $options['navigation_text_color'] ) ); - - $css->set_selector( '.header-wrap #site-navigation:not(.toggled) .menu-bar-item:not(.close-search):hover > a, .header-wrap #mobile-header:not(.toggled) .menu-bar-item:not(.close-search):hover > a, .header-wrap #site-navigation:not(.toggled) .menu-bar-item:not(.close-search).sfHover > a, .header-wrap #mobile-header:not(.toggled) .menu-bar-item:not(.close-search).sfHover > a' ); - $css->add_property( 'background', $navigation_background_hover ); - - if ( '' !== $options['navigation_text_color_hover'] ) { - $css->add_property( 'color', esc_attr( $options['navigation_text_color_hover'] ) ); - } else { - $css->add_property( 'color', esc_attr( $options['navigation_text_color'] ) ); - } - } - - if ( 'merge-desktop' === $options['site_header_merge'] ) { - $css->stop_media_query(); - } - } - - if ( $css->css_output() ) { - $new_css = $css->css_output(); - } - } - - return $css_output . $new_css; -} - -add_action( 'customize_register', 'generate_pro_compat_customize_register', 100 ); -/** - * Alter some Customizer options in the pro version. - * - * @since 3.0.0 - * @param object $wp_customize The Customizer object. - */ -function generate_pro_compat_customize_register( $wp_customize ) { - if ( ! defined( 'GP_PREMIUM_VERSION' ) ) { - return; - } - - if ( version_compare( GP_PREMIUM_VERSION, '1.12.0-alpha.1', '<' ) ) { - if ( $wp_customize->get_setting( 'generate_spacing_settings[separator]' ) ) { - $wp_customize->get_setting( 'generate_spacing_settings[separator]' )->transport = 'refresh'; - } - - if ( $wp_customize->get_setting( 'generate_spacing_settings[right_sidebar_width]' ) ) { - $wp_customize->get_setting( 'generate_spacing_settings[right_sidebar_width]' )->transport = 'refresh'; - } - - if ( $wp_customize->get_setting( 'generate_spacing_settings[left_sidebar_width]' ) ) { - $wp_customize->get_setting( 'generate_spacing_settings[left_sidebar_width]' )->transport = 'refresh'; - } - - if ( $wp_customize->get_setting( 'generate_spacing_settings[footer_widget_container_top]' ) ) { - $wp_customize->get_setting( 'generate_spacing_settings[footer_widget_container_top]' )->transport = 'refresh'; - } - - if ( $wp_customize->get_setting( 'generate_spacing_settings[footer_widget_container_right]' ) ) { - $wp_customize->get_setting( 'generate_spacing_settings[footer_widget_container_right]' )->transport = 'refresh'; - } - - if ( $wp_customize->get_setting( 'generate_spacing_settings[footer_widget_container_bottom]' ) ) { - $wp_customize->get_setting( 'generate_spacing_settings[footer_widget_container_bottom]' )->transport = 'refresh'; - } - - if ( $wp_customize->get_setting( 'generate_spacing_settings[footer_widget_container_left]' ) ) { - $wp_customize->get_setting( 'generate_spacing_settings[footer_widget_container_left]' )->transport = 'refresh'; - } - - if ( $wp_customize->get_setting( 'generate_spacing_settings[mobile_footer_widget_container_top]' ) ) { - $wp_customize->get_setting( 'generate_spacing_settings[mobile_footer_widget_container_top]' )->transport = 'refresh'; - } - - if ( $wp_customize->get_setting( 'generate_spacing_settings[mobile_footer_widget_container_right]' ) ) { - $wp_customize->get_setting( 'generate_spacing_settings[mobile_footer_widget_container_right]' )->transport = 'refresh'; - } - - if ( $wp_customize->get_setting( 'generate_spacing_settings[mobile_footer_widget_container_bottom]' ) ) { - $wp_customize->get_setting( 'generate_spacing_settings[mobile_footer_widget_container_bottom]' )->transport = 'refresh'; - } - - if ( $wp_customize->get_setting( 'generate_spacing_settings[mobile_footer_widget_container_left]' ) ) { - $wp_customize->get_setting( 'generate_spacing_settings[mobile_footer_widget_container_left]' )->transport = 'refresh'; - } - - if ( $wp_customize->get_setting( 'generate_spacing_settings[footer_top]' ) ) { - $wp_customize->get_setting( 'generate_spacing_settings[footer_top]' )->transport = 'refresh'; - } - - if ( $wp_customize->get_setting( 'generate_spacing_settings[footer_right]' ) ) { - $wp_customize->get_setting( 'generate_spacing_settings[footer_right]' )->transport = 'refresh'; - } - - if ( $wp_customize->get_setting( 'generate_spacing_settings[footer_bottom]' ) ) { - $wp_customize->get_setting( 'generate_spacing_settings[footer_bottom]' )->transport = 'refresh'; - } - - if ( $wp_customize->get_setting( 'generate_spacing_settings[footer_left]' ) ) { - $wp_customize->get_setting( 'generate_spacing_settings[footer_left]' )->transport = 'refresh'; - } - } -} - -add_action( 'wp', 'generate_do_pro_compatibility_setup' ); -/** - * Do basic compatibility with GP Premium versions. - * - * @since 3.0.0 - */ -function generate_do_pro_compatibility_setup() { - if ( ! defined( 'GP_PREMIUM_VERSION' ) ) { - return; - } - - if ( version_compare( GP_PREMIUM_VERSION, '1.12.0-alpha.1', '<' ) ) { - // Fix Elements removing archive post titles. - if ( function_exists( 'generate_premium_do_elements' ) && ! is_singular() ) { - add_filter( 'generate_show_title', '__return_true', 20 ); - } - } -} + +
> +
> + +
> +
+ +
> + +
+ +
+
+ +
+
+ post_date ); + if ( $post_date < $compare_date ) { + $css = '.fl-builder.no-sidebar .container.grid-container { + max-width: 100%; + } + + .fl-builder.one-container.no-sidebar .site-content { + padding:0; + }'; + $css = str_replace( array( "\r", "\n", "\t" ), '', $css ); + wp_add_inline_style( 'generate-style', $css ); + } + } + } +} + +add_action( 'wp_enqueue_scripts', 'generate_do_third_party_plugin_css', 50 ); +/** + * Add CSS for third-party plugins. + * + * @since 3.0.1 + */ +function generate_do_third_party_plugin_css() { + $css = new GeneratePress_CSS(); + + if ( generate_is_using_flexbox() && class_exists( 'Elementor\Plugin' ) ) { + $css->set_selector( '.elementor-template-full-width .site-content' ); + $css->add_property( 'display', 'block' ); + } + + if ( $css->css_output() ) { + wp_add_inline_style( 'generate-style', $css->css_output() ); + } +} + +add_action( 'wp_enqueue_scripts', 'generate_do_pro_compatibility', 50 ); +/** + * Add CSS to ensure compatibility with GP Premium. + * + * @since 3.0.0 + */ +function generate_do_pro_compatibility() { + if ( ! defined( 'GP_PREMIUM_VERSION' ) ) { + return; + } + + $css = new GeneratePress_CSS(); + + if ( version_compare( GP_PREMIUM_VERSION, '1.11.0-alpha.1', '<' ) ) { + if ( generate_is_using_flexbox() && defined( 'GENERATE_SECONDARY_NAV_VERSION' ) ) { + $css->set_selector( '.secondary-navigation .inside-navigation:before, .secondary-navigation .inside-navigation:after' ); + $css->add_property( 'content', '"."' ); + $css->add_property( 'display', 'block' ); + $css->add_property( 'overflow', 'hidden' ); + $css->add_property( 'visibility', 'hidden' ); + $css->add_property( 'font-size', '0px' ); + $css->add_property( 'line-height', '0px' ); + $css->add_property( 'width', '0px' ); + $css->add_property( 'height', '0px' ); + + $css->set_selector( '.secondary-navigation .inside-navigation:after' ); + $css->add_property( 'clear', 'both' ); + } + } + + if ( version_compare( GP_PREMIUM_VERSION, '1.12.0-alpha.1', '<' ) ) { + if ( defined( 'GENERATE_MENU_PLUS_VERSION' ) && function_exists( 'generate_menu_plus_get_defaults' ) ) { + $menu_plus_settings = wp_parse_args( + get_option( 'generate_menu_plus_settings', array() ), + generate_menu_plus_get_defaults() + ); + + if ( generate_is_using_flexbox() && ( 'true' === $menu_plus_settings['sticky_menu'] || 'desktop' === $menu_plus_settings['sticky_menu'] || 'mobile' === $menu_plus_settings['sticky_menu'] || 'enable' === $menu_plus_settings['mobile_header_sticky'] ) ) { + if ( generate_has_inline_mobile_toggle() ) { + $css->start_media_query( generate_get_media_query( 'mobile-menu' ) ); + + $css->set_selector( '#sticky-placeholder' ); + $css->add_property( 'height', '0' ); + $css->add_property( 'overflow', 'hidden' ); + + $css->set_selector( '.has-inline-mobile-toggle #site-navigation.toggled' ); + $css->add_property( 'margin-top', '0' ); + + $css->set_selector( '.has-inline-mobile-menu #site-navigation.toggled .main-nav > ul' ); + $css->add_property( 'top', '1.5em' ); + + $css->stop_media_query(); + } + + if ( 'desktop' === $menu_plus_settings['sticky_menu'] ) { + $css->set_selector( '.sticky-enabled .gen-sidebar-nav.is_stuck .main-navigation' ); + $css->add_property( 'margin-bottom', '0' ); + + $css->set_selector( '.sticky-enabled .gen-sidebar-nav.is_stuck' ); + $css->add_property( 'z-index', '500' ); + + $css->set_selector( '.sticky-enabled .main-navigation.is_stuck' ); + $css->add_property( 'box-shadow', '0 2px 2px -2px rgba(0, 0, 0, .2)' ); + + $css->set_selector( '.navigation-stick:not(.gen-sidebar-nav)' ); + $css->add_property( 'left', '0' ); + $css->add_property( 'right', '0' ); + $css->add_property( 'width', '100% !important' ); + + $css->set_selector( '.both-sticky-menu .main-navigation:not(#mobile-header).toggled .main-nav > ul,.mobile-sticky-menu .main-navigation:not(#mobile-header).toggled .main-nav > ul,.mobile-header-sticky #mobile-header.toggled .main-nav > ul' ); + $css->add_property( 'position', 'absolute' ); + $css->add_property( 'left', '0' ); + $css->add_property( 'right', '0' ); + $css->add_property( 'z-index', '999' ); + } + + $css->set_selector( '.nav-float-right .navigation-stick' ); + $css->add_property( 'width', '100% !important' ); + $css->add_property( 'left', '0' ); + + $css->set_selector( '.nav-float-right .navigation-stick .navigation-branding' ); + $css->add_property( 'margin-right', 'auto' ); + + if ( ! $menu_plus_settings['navigation_as_header'] ) { + $header_left = 40; + $header_right = 40; + $mobile_header_left = 30; + $mobile_header_right = 30; + + if ( function_exists( 'generate_spacing_get_defaults' ) ) { + $spacing_settings = wp_parse_args( + get_option( 'generate_spacing_settings', array() ), + generate_spacing_get_defaults() + ); + + $header_left = $spacing_settings['header_left']; + $header_right = $spacing_settings['header_right']; + $mobile_header_left = $spacing_settings['mobile_header_left']; + $mobile_header_right = $spacing_settings['mobile_header_right']; + } + + if ( function_exists( 'generate_is_using_flexbox' ) && generate_is_using_flexbox() ) { + if ( function_exists( 'generate_get_option' ) && 'text' === generate_get_option( 'container_alignment' ) ) { + $css->set_selector( '.main-navigation.navigation-stick .inside-navigation.grid-container' ); + $css->add_property( 'padding-left', $header_left, false, 'px' ); + $css->add_property( 'padding-right', $header_right, false, 'px' ); + + $css->start_media_query( generate_get_media_query( 'mobile-menu' ) ); + $css->set_selector( '.main-navigation.navigation-stick .inside-navigation.grid-container' ); + $css->add_property( 'padding-left', $mobile_header_left, false, 'px' ); + $css->add_property( 'padding-right', $mobile_header_right, false, 'px' ); + $css->stop_media_query(); + } + } + } + + $css->set_selector( '.nav-float-right .main-navigation.has-branding:not([class*="nav-align-"]):not(.mobile-header-navigation) .menu-bar-items,.nav-float-right .main-navigation.has-sticky-branding.navigation-stick:not([class*="nav-align-"]):not(.mobile-header-navigation) .menu-bar-items' ); + $css->add_property( 'margin-left', '0' ); + } + + if ( generate_has_inline_mobile_toggle() && 'false' !== $menu_plus_settings['slideout_menu'] ) { + $css->set_selector( '.slideout-mobile .has-inline-mobile-toggle #site-navigation.toggled,.slideout-both .has-inline-mobile-toggle #site-navigation.toggled' ); + $css->add_property( 'margin-top', '0' ); + } + + if ( 'font' === generate_get_option( 'icons' ) ) { + $css->set_selector( '.main-navigation .slideout-toggle a:before,.slide-opened .slideout-overlay .slideout-exit:before' ); + $css->add_property( 'font-family', 'GeneratePress' ); + + $css->set_selector( '.slideout-navigation .dropdown-menu-toggle:before' ); + $css->add_property( 'content', '"\f107" !important' ); + + $css->set_selector( '.slideout-navigation .sfHover > a .dropdown-menu-toggle:before' ); + $css->add_property( 'content', '"\f106" !important' ); + } + + if ( generate_is_using_flexbox() && $menu_plus_settings['navigation_as_header'] ) { + $content_left = 40; + $content_right = 40; + + if ( function_exists( 'generate_spacing_get_defaults' ) ) { + $spacing_settings = wp_parse_args( + get_option( 'generate_spacing_settings', array() ), + generate_spacing_get_defaults() + ); + + $content_left = $spacing_settings['content_left']; + $content_right = $spacing_settings['content_right']; + } + + if ( 'text' === generate_get_option( 'container_alignment' ) ) { + $css->set_selector( '.main-navigation.has-branding .inside-navigation.grid-container, .main-navigation.has-branding .inside-navigation.grid-container' ); + $css->add_property( 'padding', generate_padding_css( 0, $content_right, 0, $content_left ) ); + } + + $css->set_selector( '.navigation-branding' ); + $css->add_property( 'margin-left', '10px' ); + + $css->set_selector( '.navigation-branding .main-title, .mobile-header-navigation .site-logo' ); + $css->add_property( 'margin-left', '10px' ); + + if ( is_rtl() ) { + $css->set_selector( '.navigation-branding' ); + $css->add_property( 'margin-left', 'auto' ); + $css->add_property( 'margin-right', '10px' ); + + $css->set_selector( '.navigation-branding .main-title, .mobile-header-navigation .site-logo' ); + $css->add_property( 'margin-right', '10px' ); + $css->add_property( 'margin-left', '0' ); + } + + $css->set_selector( '.navigation-branding > div + .main-title' ); + $css->add_property( 'margin-left', '10px' ); + + if ( is_rtl() ) { + $css->set_selector( '.navigation-branding > div + .main-title' ); + $css->add_property( 'margin-right', '10px' ); + } + + $css->set_selector( '.has-branding .navigation-branding img' ); + $css->add_property( 'margin', '0' ); + + $css->start_media_query( generate_get_media_query( 'mobile-menu' ) ); + if ( 'text' === generate_get_option( 'container_alignment' ) ) { + $css->set_selector( '.main-navigation.has-branding .inside-navigation.grid-container' ); + $css->add_property( 'padding', '0' ); + } + $css->stop_media_query(); + } + } + + if ( defined( 'GENERATE_SPACING_VERSION' ) ) { + if ( generate_is_using_flexbox() ) { + $css->set_selector( '#footer-widgets, .site-info' ); + $css->add_property( 'padding', '0' ); + } + } + + if ( defined( 'GENERATE_SECONDARY_NAV_VERSION' ) ) { + if ( generate_is_using_flexbox() && has_nav_menu( 'secondary' ) ) { + if ( 'text' === generate_get_option( 'container_alignment' ) && function_exists( 'generate_secondary_nav_get_defaults' ) ) { + $secondary_nav_settings = wp_parse_args( + get_option( 'generate_secondary_nav_settings', array() ), + generate_secondary_nav_get_defaults() + ); + + $spacing_settings = wp_parse_args( + get_option( 'generate_spacing_settings', array() ), + generate_spacing_get_defaults() + ); + + $navigation_left_padding = absint( $spacing_settings['header_left'] ) - absint( $secondary_nav_settings['secondary_menu_item'] ); + $navigation_right_padding = absint( $spacing_settings['header_right'] ) - absint( $secondary_nav_settings['secondary_menu_item'] ); + + $css->set_selector( '.secondary-nav-below-header .secondary-navigation .inside-navigation.grid-container, .secondary-nav-above-header .secondary-navigation .inside-navigation.grid-container' ); + $css->add_property( 'padding', generate_padding_css( 0, $navigation_right_padding, 0, $navigation_left_padding ) ); + } + } + } + + if ( generate_is_using_flexbox() && defined( 'GENERATE_FONT_VERSION' ) && function_exists( 'generate_get_default_fonts' ) ) { + $font_settings = wp_parse_args( + get_option( 'generate_settings', array() ), + generate_get_default_fonts() + ); + + if ( isset( $font_settings['tablet_navigation_font_size'] ) && '' !== $font_settings['tablet_navigation_font_size'] ) { + $css->start_media_query( generate_get_media_query( 'tablet' ) ); + $css->set_selector( '.main-navigation .menu-toggle' ); + $css->add_property( 'font-size', absint( $font_settings['tablet_navigation_font_size'] ), false, 'px' ); + $css->stop_media_query(); + } + + if ( isset( $font_settings['mobile_navigation_font_size'] ) && '' !== $font_settings['mobile_navigation_font_size'] ) { + $css->start_media_query( generate_get_media_query( 'mobile-menu' ) ); + $css->set_selector( '.main-navigation .menu-toggle' ); + $css->add_property( 'font-size', absint( $font_settings['mobile_navigation_font_size'] ), false, 'px' ); + $css->stop_media_query(); + } + } + + if ( ! generate_show_title() ) { + $css->set_selector( '.page .entry-content' )->add_property( 'margin-top', '0px' ); + + if ( is_single() ) { + if ( ! apply_filters( 'generate_post_author', true ) && ! apply_filters( 'generate_post_date', true ) ) { + $css->set_selector( '.single .entry-content' )->add_property( 'margin-top', '0' ); + } + } + } + } + + if ( $css->css_output() ) { + wp_add_inline_style( 'generate-style', $css->css_output() ); + } +} + +add_filter( 'generate_menu_item_dropdown_arrow_direction', 'generate_set_pro_menu_item_arrow_directions', 10, 3 ); +/** + * Set the menu item arrow directions for Secondary and Slideout navs. + * + * @since 3.0.0 + * @param string $arrow_direction The current direction. + * @param object $args The args for the current menu. + * @param int $depth The current depth of the menu item. + */ +function generate_set_pro_menu_item_arrow_directions( $arrow_direction, $args, $depth ) { + if ( function_exists( 'generate_secondary_nav_get_defaults' ) && 'secondary' === $args->theme_location ) { + $settings = wp_parse_args( + get_option( 'generate_secondary_nav_settings', array() ), + generate_secondary_nav_get_defaults() + ); + + if ( 0 !== $depth ) { + $arrow_direction = 'right'; + + if ( 'left' === $settings['secondary_nav_dropdown_direction'] ) { + $arrow_direction = 'left'; + } + } + + if ( 'secondary-nav-left-sidebar' === $settings['secondary_nav_position_setting'] ) { + $arrow_direction = 'right'; + + if ( 'both-right' === generate_get_layout() ) { + $arrow_direction = 'left'; + } + } + + if ( 'secondary-nav-right-sidebar' === $settings['secondary_nav_position_setting'] ) { + $arrow_direction = 'left'; + + if ( 'both-left' === generate_get_layout() ) { + $arrow_direction = 'right'; + } + } + + if ( 'hover' !== generate_get_option( 'nav_dropdown_type' ) ) { + $arrow_direction = 'down'; + } + } + + return $arrow_direction; +} + +add_filter( 'generate_menu_plus_option_defaults', 'generate_set_menu_plus_compat_defaults' ); +/** + * Set defaults in our pro Menu Plus module. + * + * @since 3.0.0 + * @param array $defaults The existing defaults. + */ +function generate_set_menu_plus_compat_defaults( $defaults ) { + if ( generate_has_inline_mobile_toggle() ) { + $defaults['mobile_menu_label'] = ''; + } + + return $defaults; +} + +add_filter( 'generate_spacing_option_defaults', 'generate_set_spacing_compat_defaults', 20 ); +/** + * Set defaults in our pro Spacing module. + * + * @since 3.0.0 + * @param array $defaults The existing defaults. + */ +function generate_set_spacing_compat_defaults( $defaults ) { + $defaults['mobile_header_top'] = ''; + $defaults['mobile_header_bottom'] = ''; + $defaults['mobile_header_right'] = '30'; + $defaults['mobile_header_left'] = '30'; + + $defaults['mobile_widget_top'] = '30'; + $defaults['mobile_widget_right'] = '30'; + $defaults['mobile_widget_bottom'] = '30'; + $defaults['mobile_widget_left'] = '30'; + + $defaults['mobile_footer_widget_container_top'] = '30'; + $defaults['mobile_footer_widget_container_right'] = '30'; + $defaults['mobile_footer_widget_container_bottom'] = '30'; + $defaults['mobile_footer_widget_container_left'] = '30'; + + return $defaults; +} + +add_filter( 'generate_page_hero_css_output', 'generate_do_pro_page_hero_css', 10, 2 ); +/** + * Add CSS to our premium Page Heroes. + * + * @since 3.0.0 + * @param string $css_output Existing CSS. + * @param array $options The Header Element options. + */ +function generate_do_pro_page_hero_css( $css_output, $options ) { + if ( ! defined( 'GP_PREMIUM_VERSION' ) ) { + return $css_output; + } + + $new_css = ''; + + if ( version_compare( GP_PREMIUM_VERSION, '1.12.0-alpha.1', '<' ) ) { + $css = new GeneratePress_CSS(); + + $padding_inside = false; + + if ( generate_is_using_flexbox() && 'text' === generate_get_option( 'container_alignment' ) ) { + $padding_inside = true; + } + + if ( $padding_inside ) { + $container_width = generate_get_option( 'container_width' ); + $padding_right = '0px'; + $padding_left = '0px'; + + if ( $options['padding_right'] ) { + $padding_right = absint( $options['padding_right'] ) . $options['padding_right_unit']; + } + + if ( $options['padding_left'] ) { + $padding_left = absint( $options['padding_left'] ) . $options['padding_left_unit']; + } + + $css->set_selector( '.page-hero .inside-page-hero.grid-container' ); + + $css->add_property( + 'max-width', + sprintf( + 'calc(%1$s - %2$s - %3$s)', + $container_width . 'px', + $padding_right, + $padding_left + ) + ); + } + + if ( generate_is_using_flexbox() && '' !== $options['site_header_merge'] ) { + if ( 'merge-desktop' === $options['site_header_merge'] ) { + $css->start_media_query( apply_filters( 'generate_not_mobile_media_query', '(min-width: 769px)' ) ); + } + + if ( $options['navigation_colors'] ) { + $navigation_background = $options['navigation_background_color'] ? $options['navigation_background_color'] : 'transparent'; + $navigation_background_hover = $options['navigation_background_color_hover'] ? $options['navigation_background_color_hover'] : 'transparent'; + + $css->set_selector( '.header-wrap #site-navigation:not(.toggled), .header-wrap #mobile-header:not(.toggled):not(.navigation-stick), .has-inline-mobile-toggle .mobile-menu-control-wrapper' ); + $css->add_property( 'background', $navigation_background ); + + $css->set_selector( '.main-navigation:not(.toggled):not(.navigation-stick) .menu-bar-item:not(.close-search) > a' ); + $css->add_property( 'color', esc_attr( $options['navigation_text_color'] ) ); + + $css->set_selector( '.header-wrap #site-navigation:not(.toggled) .menu-bar-item:not(.close-search):hover > a, .header-wrap #mobile-header:not(.toggled) .menu-bar-item:not(.close-search):hover > a, .header-wrap #site-navigation:not(.toggled) .menu-bar-item:not(.close-search).sfHover > a, .header-wrap #mobile-header:not(.toggled) .menu-bar-item:not(.close-search).sfHover > a' ); + $css->add_property( 'background', $navigation_background_hover ); + + if ( '' !== $options['navigation_text_color_hover'] ) { + $css->add_property( 'color', esc_attr( $options['navigation_text_color_hover'] ) ); + } else { + $css->add_property( 'color', esc_attr( $options['navigation_text_color'] ) ); + } + } + + if ( 'merge-desktop' === $options['site_header_merge'] ) { + $css->stop_media_query(); + } + } + + if ( $css->css_output() ) { + $new_css = $css->css_output(); + } + } + + return $css_output . $new_css; +} + +add_action( 'customize_register', 'generate_pro_compat_customize_register', 100 ); +/** + * Alter some Customizer options in the pro version. + * + * @since 3.0.0 + * @param object $wp_customize The Customizer object. + */ +function generate_pro_compat_customize_register( $wp_customize ) { + if ( ! defined( 'GP_PREMIUM_VERSION' ) ) { + return; + } + + if ( version_compare( GP_PREMIUM_VERSION, '1.12.0-alpha.1', '<' ) ) { + if ( $wp_customize->get_setting( 'generate_spacing_settings[separator]' ) ) { + $wp_customize->get_setting( 'generate_spacing_settings[separator]' )->transport = 'refresh'; + } + + if ( $wp_customize->get_setting( 'generate_spacing_settings[right_sidebar_width]' ) ) { + $wp_customize->get_setting( 'generate_spacing_settings[right_sidebar_width]' )->transport = 'refresh'; + } + + if ( $wp_customize->get_setting( 'generate_spacing_settings[left_sidebar_width]' ) ) { + $wp_customize->get_setting( 'generate_spacing_settings[left_sidebar_width]' )->transport = 'refresh'; + } + + if ( $wp_customize->get_setting( 'generate_spacing_settings[footer_widget_container_top]' ) ) { + $wp_customize->get_setting( 'generate_spacing_settings[footer_widget_container_top]' )->transport = 'refresh'; + } + + if ( $wp_customize->get_setting( 'generate_spacing_settings[footer_widget_container_right]' ) ) { + $wp_customize->get_setting( 'generate_spacing_settings[footer_widget_container_right]' )->transport = 'refresh'; + } + + if ( $wp_customize->get_setting( 'generate_spacing_settings[footer_widget_container_bottom]' ) ) { + $wp_customize->get_setting( 'generate_spacing_settings[footer_widget_container_bottom]' )->transport = 'refresh'; + } + + if ( $wp_customize->get_setting( 'generate_spacing_settings[footer_widget_container_left]' ) ) { + $wp_customize->get_setting( 'generate_spacing_settings[footer_widget_container_left]' )->transport = 'refresh'; + } + + if ( $wp_customize->get_setting( 'generate_spacing_settings[mobile_footer_widget_container_top]' ) ) { + $wp_customize->get_setting( 'generate_spacing_settings[mobile_footer_widget_container_top]' )->transport = 'refresh'; + } + + if ( $wp_customize->get_setting( 'generate_spacing_settings[mobile_footer_widget_container_right]' ) ) { + $wp_customize->get_setting( 'generate_spacing_settings[mobile_footer_widget_container_right]' )->transport = 'refresh'; + } + + if ( $wp_customize->get_setting( 'generate_spacing_settings[mobile_footer_widget_container_bottom]' ) ) { + $wp_customize->get_setting( 'generate_spacing_settings[mobile_footer_widget_container_bottom]' )->transport = 'refresh'; + } + + if ( $wp_customize->get_setting( 'generate_spacing_settings[mobile_footer_widget_container_left]' ) ) { + $wp_customize->get_setting( 'generate_spacing_settings[mobile_footer_widget_container_left]' )->transport = 'refresh'; + } + + if ( $wp_customize->get_setting( 'generate_spacing_settings[footer_top]' ) ) { + $wp_customize->get_setting( 'generate_spacing_settings[footer_top]' )->transport = 'refresh'; + } + + if ( $wp_customize->get_setting( 'generate_spacing_settings[footer_right]' ) ) { + $wp_customize->get_setting( 'generate_spacing_settings[footer_right]' )->transport = 'refresh'; + } + + if ( $wp_customize->get_setting( 'generate_spacing_settings[footer_bottom]' ) ) { + $wp_customize->get_setting( 'generate_spacing_settings[footer_bottom]' )->transport = 'refresh'; + } + + if ( $wp_customize->get_setting( 'generate_spacing_settings[footer_left]' ) ) { + $wp_customize->get_setting( 'generate_spacing_settings[footer_left]' )->transport = 'refresh'; + } + } +} + +add_action( 'wp', 'generate_do_pro_compatibility_setup' ); +/** + * Do basic compatibility with GP Premium versions. + * + * @since 3.0.0 + */ +function generate_do_pro_compatibility_setup() { + if ( ! defined( 'GP_PREMIUM_VERSION' ) ) { + return; + } + + if ( version_compare( GP_PREMIUM_VERSION, '1.12.0-alpha.1', '<' ) ) { + // Fix Elements removing archive post titles. + if ( function_exists( 'generate_premium_do_elements' ) && ! is_singular() ) { + add_filter( 'generate_show_title', '__return_true', 20 ); + } + } +} diff --git a/wp-content/themes/generatepress/inc/structure/archives.php b/wp-content/themes/generatepress/inc/structure/archives.php index b5065e26..1b06a97c 100644 --- a/wp-content/themes/generatepress/inc/structure/archives.php +++ b/wp-content/themes/generatepress/inc/structure/archives.php @@ -1,117 +1,117 @@ - - - %2$s', - get_avatar( get_the_author_meta( 'ID' ), 50 ), - get_the_author() - ); - - /* - * Since we called the_post() above, we need to - * rewind the loop back to the beginning that way - * we can run the loop properly, in full. - */ - rewind_posts(); - } - - return $title; - - } -} - -add_action( 'generate_after_archive_title', 'generate_do_archive_description' ); -/** - * Output the archive description. - * - * @since 2.3 - */ -function generate_do_archive_description() { - $term_description = term_description(); - - if ( ! empty( $term_description ) ) { - printf( '
%s
', $term_description ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped - } - - if ( get_the_author_meta( 'description' ) && is_author() ) { - echo '
' . get_the_author_meta( 'description' ) . '
'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped - } - - /** - * generate_after_archive_description hook. - * - * @since 0.1 - */ - do_action( 'generate_after_archive_description' ); -} + + + %2$s', + get_avatar( get_the_author_meta( 'ID' ), 50 ), + get_the_author() + ); + + /* + * Since we called the_post() above, we need to + * rewind the loop back to the beginning that way + * we can run the loop properly, in full. + */ + rewind_posts(); + } + + return $title; + + } +} + +add_action( 'generate_after_archive_title', 'generate_do_archive_description' ); +/** + * Output the archive description. + * + * @since 2.3 + */ +function generate_do_archive_description() { + $term_description = term_description(); + + if ( ! empty( $term_description ) ) { + printf( '
%s
', $term_description ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped + } + + if ( get_the_author_meta( 'description' ) && is_author() ) { + echo '
' . get_the_author_meta( 'description' ) . '
'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped + } + + /** + * generate_after_archive_description hook. + * + * @since 0.1 + */ + do_action( 'generate_after_archive_description' ); +} diff --git a/wp-content/themes/generatepress/inc/structure/comments.php b/wp-content/themes/generatepress/inc/structure/comments.php index 604053f6..ce39ca3e 100644 --- a/wp-content/themes/generatepress/inc/structure/comments.php +++ b/wp-content/themes/generatepress/inc/structure/comments.php @@ -1,204 +1,204 @@ -comment_type || 'trackback' === $comment->comment_type ) : ?> - -
  • > -
    - ', '' ); ?> -
    - - - -
  • > -
    > -
    - -
    -
    > - %s', get_comment_author_link() ); ?> -
    - - -
    - - comment_approved ) : // phpcs:ignore ?> -

    - -
    - -
    - -
    -
    - 'div-comment', - 'depth' => $depth, - 'max_depth' => $args['max_depth'], - 'before' => '', - 'after' => '', - ) - ) - ); -} - -add_filter( 'comment_form_defaults', 'generate_set_comment_form_defaults' ); -/** - * Set the default settings for our comments. - * - * @since 2.3 - * - * @param array $defaults The existing defaults. - * @return array - */ -function generate_set_comment_form_defaults( $defaults ) { - $defaults['comment_field'] = sprintf( - '

    ', - esc_html__( 'Comment', 'generatepress' ) - ); - - $defaults['comment_notes_before'] = null; - $defaults['comment_notes_after'] = null; - $defaults['id_form'] = 'commentform'; - $defaults['id_submit'] = 'submit'; - $defaults['title_reply'] = apply_filters( 'generate_leave_comment', __( 'Leave a Comment', 'generatepress' ) ); - $defaults['label_submit'] = apply_filters( 'generate_post_comment', __( 'Post Comment', 'generatepress' ) ); - - return $defaults; -} - -add_filter( 'comment_form_default_fields', 'generate_filter_comment_fields' ); -/** - * Customizes the existing comment fields. - * - * @since 2.1.2 - * @param array $fields The existing fields. - * @return array - */ -function generate_filter_comment_fields( $fields ) { - $commenter = wp_get_current_commenter(); - $required = get_option( 'require_name_email' ); - - $fields['author'] = sprintf( - '', - esc_html__( 'Name', 'generatepress' ), - esc_attr( $commenter['comment_author'] ), - $required ? ' *' : '' - ); - - $fields['email'] = sprintf( - '', - esc_html__( 'Email', 'generatepress' ), - esc_attr( $commenter['comment_author_email'] ), - $required ? ' *' : '' - ); - - $fields['url'] = sprintf( - '', - esc_html__( 'Website', 'generatepress' ), - esc_attr( $commenter['comment_author_url'] ) - ); - - return $fields; -} - -add_action( 'generate_after_do_template_part', 'generate_do_comments_template', 15 ); -/** - * Add the comments template to pages and single posts. - * - * @since 3.0.0 - * @param string $template The template we're targeting. - */ -function generate_do_comments_template( $template ) { - if ( 'single' === $template || 'page' === $template ) { - // If comments are open or we have at least one comment, load up the comment template. - // phpcs:ignore WordPress.PHP.StrictComparisons.LooseComparison -- Intentionally loose. - if ( comments_open() || '0' != get_comments_number() ) : - /** - * generate_before_comments_container hook. - * - * @since 2.1 - */ - do_action( 'generate_before_comments_container' ); - ?> - -
    - -
    - - comment_type || 'trackback' === $comment->comment_type ) : ?> + +
  • > +
    + ', '' ); ?> +
    + + + +
  • > +
    > +
    + +
    +
    > + %s', get_comment_author_link() ); ?> +
    + + +
    + + comment_approved ) : // phpcs:ignore ?> +

    + +
    + +
    + +
    +
    + 'div-comment', + 'depth' => $depth, + 'max_depth' => $args['max_depth'], + 'before' => '', + 'after' => '', + ) + ) + ); +} + +add_filter( 'comment_form_defaults', 'generate_set_comment_form_defaults' ); +/** + * Set the default settings for our comments. + * + * @since 2.3 + * + * @param array $defaults The existing defaults. + * @return array + */ +function generate_set_comment_form_defaults( $defaults ) { + $defaults['comment_field'] = sprintf( + '

    ', + esc_html__( 'Comment', 'generatepress' ) + ); + + $defaults['comment_notes_before'] = null; + $defaults['comment_notes_after'] = null; + $defaults['id_form'] = 'commentform'; + $defaults['id_submit'] = 'submit'; + $defaults['title_reply'] = apply_filters( 'generate_leave_comment', __( 'Leave a Comment', 'generatepress' ) ); + $defaults['label_submit'] = apply_filters( 'generate_post_comment', __( 'Post Comment', 'generatepress' ) ); + + return $defaults; +} + +add_filter( 'comment_form_default_fields', 'generate_filter_comment_fields' ); +/** + * Customizes the existing comment fields. + * + * @since 2.1.2 + * @param array $fields The existing fields. + * @return array + */ +function generate_filter_comment_fields( $fields ) { + $commenter = wp_get_current_commenter(); + $required = get_option( 'require_name_email' ); + + $fields['author'] = sprintf( + '', + esc_html__( 'Name', 'generatepress' ), + esc_attr( $commenter['comment_author'] ), + $required ? ' *' : '' + ); + + $fields['email'] = sprintf( + '', + esc_html__( 'Email', 'generatepress' ), + esc_attr( $commenter['comment_author_email'] ), + $required ? ' *' : '' + ); + + $fields['url'] = sprintf( + '', + esc_html__( 'Website', 'generatepress' ), + esc_attr( $commenter['comment_author_url'] ) + ); + + return $fields; +} + +add_action( 'generate_after_do_template_part', 'generate_do_comments_template', 15 ); +/** + * Add the comments template to pages and single posts. + * + * @since 3.0.0 + * @param string $template The template we're targeting. + */ +function generate_do_comments_template( $template ) { + if ( 'single' === $template || 'page' === $template ) { + // If comments are open or we have at least one comment, load up the comment template. + // phpcs:ignore WordPress.PHP.StrictComparisons.LooseComparison -- Intentionally loose. + if ( comments_open() || '0' != get_comments_number() ) : + /** + * generate_before_comments_container hook. + * + * @since 2.1 + */ + do_action( 'generate_before_comments_container' ); + ?> + +
    + +
    + + -
    > -
    - - -
    -
    - - - © %1$s %2$s • %4$s %5$s', - date( 'Y' ), // phpcs:ignore - get_bloginfo( 'name' ), - esc_url( 'https://generatepress.com' ), - _x( 'Built with', 'GeneratePress', 'generatepress' ), - __( 'GeneratePress', 'generatepress' ), - 'microdata' === generate_get_schema_type() ? ' itemprop="url"' : '' - ); - - echo apply_filters( 'generate_copyright', $copyright ); // phpcs:ignore - } -} - -/** - * Build our individual footer widgets. - * Displays a sample widget if no widget is found in the area. - * - * @since 2.0 - * - * @param int $widget_width The width class of our widget. - * @param int $widget The ID of our widget. - */ -function generate_do_footer_widget( $widget_width, $widget ) { - $widget_classes = sprintf( - 'footer-widget-%s', - absint( $widget ) - ); - - if ( ! generate_is_using_flexbox() ) { - $widget_width = apply_filters( "generate_footer_widget_{$widget}_width", $widget_width ); - $tablet_widget_width = apply_filters( "generate_footer_widget_{$widget}_tablet_width", '50' ); - - $widget_classes = sprintf( - 'footer-widget-%1$s grid-parent grid-%2$s tablet-grid-%3$s mobile-grid-100', - absint( $widget ), - absint( $widget_width ), - absint( $tablet_widget_width ) - ); - } - ?> -
    - -
    - - - - %5$s - ', - esc_attr__( 'Scroll back to top', 'generatepress' ), - absint( apply_filters( 'generate_back_to_top_scroll_speed', 400 ) ), - absint( apply_filters( 'generate_back_to_top_start_scroll', 300 ) ), - esc_attr( apply_filters( 'generate_back_to_top_icon', 'fa-angle-up' ) ), - generate_get_svg_icon( 'arrow-up' ) - ) - ); - } -} + +
    > +
    + + +
    +
    + + + © %1$s %2$s • %4$s %5$s', + date( 'Y' ), // phpcs:ignore + get_bloginfo( 'name' ), + esc_url( 'https://generatepress.com' ), + _x( 'Built with', 'GeneratePress', 'generatepress' ), + __( 'GeneratePress', 'generatepress' ), + 'microdata' === generate_get_schema_type() ? ' itemprop="url"' : '' + ); + + echo apply_filters( 'generate_copyright', $copyright ); // phpcs:ignore + } +} + +/** + * Build our individual footer widgets. + * Displays a sample widget if no widget is found in the area. + * + * @since 2.0 + * + * @param int $widget_width The width class of our widget. + * @param int $widget The ID of our widget. + */ +function generate_do_footer_widget( $widget_width, $widget ) { + $widget_classes = sprintf( + 'footer-widget-%s', + absint( $widget ) + ); + + if ( ! generate_is_using_flexbox() ) { + $widget_width = apply_filters( "generate_footer_widget_{$widget}_width", $widget_width ); + $tablet_widget_width = apply_filters( "generate_footer_widget_{$widget}_tablet_width", '50' ); + + $widget_classes = sprintf( + 'footer-widget-%1$s grid-parent grid-%2$s tablet-grid-%3$s mobile-grid-100', + absint( $widget ), + absint( $widget_width ), + absint( $tablet_widget_width ) + ); + } + ?> +
    + +
    + + + + %5$s + ', + esc_attr__( 'Scroll back to top', 'generatepress' ), + absint( apply_filters( 'generate_back_to_top_scroll_speed', 400 ) ), + absint( apply_filters( 'generate_back_to_top_start_scroll', 300 ) ), + esc_attr( apply_filters( 'generate_back_to_top_icon', 'fa-angle-up' ) ), + generate_get_svg_icon( 'arrow-up' ) + ) + ); + } +} diff --git a/wp-content/themes/generatepress/inc/structure/header.php b/wp-content/themes/generatepress/inc/structure/header.php index cf440c13..1f3e068d 100644 --- a/wp-content/themes/generatepress/inc/structure/header.php +++ b/wp-content/themes/generatepress/inc/structure/header.php @@ -1,404 +1,404 @@ - -
    > -
    > - -
    -
    - 'header-image is-logo-image', - 'alt' => esc_attr( apply_filters( 'generate_logo_title', get_bloginfo( 'name', 'display' ) ) ), - 'src' => $logo_url, - 'title' => esc_attr( apply_filters( 'generate_logo_title', get_bloginfo( 'name', 'display' ) ) ), - ) - ); - - if ( '' !== $retina_logo_url ) { - $attr['srcset'] = $logo_url . ' 1x, ' . $retina_logo_url . ' 2x'; - - // Add dimensions to image if retina is set. This fixes a container width bug in Firefox. - if ( function_exists( 'the_custom_logo' ) && get_theme_mod( 'custom_logo' ) ) { - $data = wp_get_attachment_metadata( get_theme_mod( 'custom_logo' ) ); - - if ( ! empty( $data ) ) { - $attr['width'] = $data['width']; - $attr['height'] = $data['height']; - } - } - } elseif ( generate_is_using_flexbox() ) { - // Add this to flexbox version only until we can verify it won't conflict with existing installs. - if ( function_exists( 'the_custom_logo' ) && get_theme_mod( 'custom_logo' ) ) { - $data = wp_get_attachment_metadata( get_theme_mod( 'custom_logo' ) ); - - if ( ! empty( $data ) ) { - $attr['width'] = $data['width']; - $attr['height'] = $data['height']; - } - } - } - - $attr = array_map( 'esc_attr', $attr ); - - $html_attr = ''; - foreach ( $attr as $name => $value ) { - $html_attr .= " $name=" . '"' . $value . '"'; - } - - // Print our HTML. - echo apply_filters( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped - 'generate_logo_output', - sprintf( - '', - esc_url( apply_filters( 'generate_logo_href', home_url( '/' ) ) ), - esc_attr( apply_filters( 'generate_logo_title', get_bloginfo( 'name', 'display' ) ) ), - $html_attr - ), - $logo_url, - $html_attr - ); - - /** - * generate_after_logo hook. - * - * @since 0.1 - */ - do_action( 'generate_after_logo' ); - } -} - -if ( ! function_exists( 'generate_construct_site_title' ) ) { - /** - * Build the site title and tagline. - * - * @since 1.3.28 - */ - function generate_construct_site_title() { - $generate_settings = wp_parse_args( - get_option( 'generate_settings', array() ), - generate_get_defaults() - ); - - // Get the title and tagline. - $title = get_bloginfo( 'title' ); - $tagline = get_bloginfo( 'description' ); - - // If the disable title checkbox is checked, or the title field is empty, return true. - $disable_title = ( '1' == $generate_settings['hide_title'] || '' == $title ) ? true : false; // phpcs:ignore - - // If the disable tagline checkbox is checked, or the tagline field is empty, return true. - $disable_tagline = ( '1' == $generate_settings['hide_tagline'] || '' == $tagline ) ? true : false; // phpcs:ignore - - $schema_type = generate_get_schema_type(); - - // Build our site title. - $site_title = apply_filters( - 'generate_site_title_output', - sprintf( - '<%1$s class="main-title"%4$s> - - %3$s - - ', - ( is_front_page() && is_home() ) ? 'h1' : 'p', - esc_url( apply_filters( 'generate_site_title_href', home_url( '/' ) ) ), - get_bloginfo( 'name' ), - 'microdata' === generate_get_schema_type() ? ' itemprop="headline"' : '' - ) - ); - - // Build our tagline. - $site_tagline = apply_filters( - 'generate_site_description_output', - sprintf( - '

    - %1$s -

    ', - html_entity_decode( get_bloginfo( 'description', 'display' ) ), // phpcs:ignore - 'microdata' === generate_get_schema_type() ? ' itemprop="description"' : '' - ) - ); - - // Site title and tagline. - if ( false === $disable_title || false === $disable_tagline ) { - if ( generate_needs_site_branding_container() ) { - echo '
    '; - generate_construct_logo(); - } - - // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- outputting site title and tagline. False positive. - echo apply_filters( - 'generate_site_branding_output', - sprintf( - '
    - %1$s - %2$s -
    ', - ( ! $disable_title ) ? $site_title : '', - ( ! $disable_tagline ) ? $site_tagline : '' - ) - ); - - if ( generate_needs_site_branding_container() ) { - echo '
    '; - } - } - } -} - -add_filter( 'generate_header_items_order', 'generate_reorder_inline_site_branding' ); -/** - * Remove the logo from it's usual position. - * - * @since 2.3 - * @param array $order Order of the header items. - */ -function generate_reorder_inline_site_branding( $order ) { - if ( ! generate_get_option( 'inline_logo_site_branding' ) || ! generate_has_logo_site_branding() ) { - return $order; - } - - return array( - 'header-widget', - 'site-branding', - ); -} - -if ( ! function_exists( 'generate_construct_header_widget' ) ) { - /** - * Build the header widget. - * - * @since 1.3.28 - */ - function generate_construct_header_widget() { - if ( is_active_sidebar( 'header' ) ) : - ?> -
    - -
    - -
    > -
    - -
    -
    - ' . "\n", esc_url( get_bloginfo( 'pingback_url' ) ) ); - } - } -} - -if ( ! function_exists( 'generate_add_viewport' ) ) { - add_action( 'wp_head', 'generate_add_viewport' ); - /** - * Add viewport to wp_head. - * - * @since 1.1.0 - */ - function generate_add_viewport() { - echo apply_filters( 'generate_meta_viewport', '' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped - } -} - -add_action( 'generate_before_header', 'generate_do_skip_to_content_link', 2 ); -/** - * Add skip to content link before the header. - * - * @since 2.0 - */ -function generate_do_skip_to_content_link() { - printf( - '', - esc_attr__( 'Skip to content', 'generatepress' ), - esc_html__( 'Skip to content', 'generatepress' ) - ); -} + +
    > +
    > + +
    +
    + 'header-image is-logo-image', + 'alt' => esc_attr( apply_filters( 'generate_logo_title', get_bloginfo( 'name', 'display' ) ) ), + 'src' => $logo_url, + 'title' => esc_attr( apply_filters( 'generate_logo_title', get_bloginfo( 'name', 'display' ) ) ), + ) + ); + + if ( '' !== $retina_logo_url ) { + $attr['srcset'] = $logo_url . ' 1x, ' . $retina_logo_url . ' 2x'; + + // Add dimensions to image if retina is set. This fixes a container width bug in Firefox. + if ( function_exists( 'the_custom_logo' ) && get_theme_mod( 'custom_logo' ) ) { + $data = wp_get_attachment_metadata( get_theme_mod( 'custom_logo' ) ); + + if ( ! empty( $data ) ) { + $attr['width'] = $data['width']; + $attr['height'] = $data['height']; + } + } + } elseif ( generate_is_using_flexbox() ) { + // Add this to flexbox version only until we can verify it won't conflict with existing installs. + if ( function_exists( 'the_custom_logo' ) && get_theme_mod( 'custom_logo' ) ) { + $data = wp_get_attachment_metadata( get_theme_mod( 'custom_logo' ) ); + + if ( ! empty( $data ) ) { + $attr['width'] = $data['width']; + $attr['height'] = $data['height']; + } + } + } + + $attr = array_map( 'esc_attr', $attr ); + + $html_attr = ''; + foreach ( $attr as $name => $value ) { + $html_attr .= " $name=" . '"' . $value . '"'; + } + + // Print our HTML. + echo apply_filters( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped + 'generate_logo_output', + sprintf( + '', + esc_url( apply_filters( 'generate_logo_href', home_url( '/' ) ) ), + esc_attr( apply_filters( 'generate_logo_title', get_bloginfo( 'name', 'display' ) ) ), + $html_attr + ), + $logo_url, + $html_attr + ); + + /** + * generate_after_logo hook. + * + * @since 0.1 + */ + do_action( 'generate_after_logo' ); + } +} + +if ( ! function_exists( 'generate_construct_site_title' ) ) { + /** + * Build the site title and tagline. + * + * @since 1.3.28 + */ + function generate_construct_site_title() { + $generate_settings = wp_parse_args( + get_option( 'generate_settings', array() ), + generate_get_defaults() + ); + + // Get the title and tagline. + $title = get_bloginfo( 'title' ); + $tagline = get_bloginfo( 'description' ); + + // If the disable title checkbox is checked, or the title field is empty, return true. + $disable_title = ( '1' == $generate_settings['hide_title'] || '' == $title ) ? true : false; // phpcs:ignore + + // If the disable tagline checkbox is checked, or the tagline field is empty, return true. + $disable_tagline = ( '1' == $generate_settings['hide_tagline'] || '' == $tagline ) ? true : false; // phpcs:ignore + + $schema_type = generate_get_schema_type(); + + // Build our site title. + $site_title = apply_filters( + 'generate_site_title_output', + sprintf( + '<%1$s class="main-title"%4$s> + + %3$s + + ', + ( is_front_page() && is_home() ) ? 'h1' : 'p', + esc_url( apply_filters( 'generate_site_title_href', home_url( '/' ) ) ), + get_bloginfo( 'name' ), + 'microdata' === generate_get_schema_type() ? ' itemprop="headline"' : '' + ) + ); + + // Build our tagline. + $site_tagline = apply_filters( + 'generate_site_description_output', + sprintf( + '

    + %1$s +

    ', + html_entity_decode( get_bloginfo( 'description', 'display' ) ), // phpcs:ignore + 'microdata' === generate_get_schema_type() ? ' itemprop="description"' : '' + ) + ); + + // Site title and tagline. + if ( false === $disable_title || false === $disable_tagline ) { + if ( generate_needs_site_branding_container() ) { + echo '
    '; + generate_construct_logo(); + } + + // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- outputting site title and tagline. False positive. + echo apply_filters( + 'generate_site_branding_output', + sprintf( + '
    + %1$s + %2$s +
    ', + ( ! $disable_title ) ? $site_title : '', + ( ! $disable_tagline ) ? $site_tagline : '' + ) + ); + + if ( generate_needs_site_branding_container() ) { + echo '
    '; + } + } + } +} + +add_filter( 'generate_header_items_order', 'generate_reorder_inline_site_branding' ); +/** + * Remove the logo from it's usual position. + * + * @since 2.3 + * @param array $order Order of the header items. + */ +function generate_reorder_inline_site_branding( $order ) { + if ( ! generate_get_option( 'inline_logo_site_branding' ) || ! generate_has_logo_site_branding() ) { + return $order; + } + + return array( + 'header-widget', + 'site-branding', + ); +} + +if ( ! function_exists( 'generate_construct_header_widget' ) ) { + /** + * Build the header widget. + * + * @since 1.3.28 + */ + function generate_construct_header_widget() { + if ( is_active_sidebar( 'header' ) ) : + ?> +
    + +
    + +
    > +
    + +
    +
    + ' . "\n", esc_url( get_bloginfo( 'pingback_url' ) ) ); + } + } +} + +if ( ! function_exists( 'generate_add_viewport' ) ) { + add_action( 'wp_head', 'generate_add_viewport' ); + /** + * Add viewport to wp_head. + * + * @since 1.1.0 + */ + function generate_add_viewport() { + echo apply_filters( 'generate_meta_viewport', '' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped + } +} + +add_action( 'generate_before_header', 'generate_do_skip_to_content_link', 2 ); +/** + * Add skip to content link before the header. + * + * @since 2.0 + */ +function generate_do_skip_to_content_link() { + printf( + '', + esc_attr__( 'Skip to content', 'generatepress' ), + esc_html__( 'Skip to content', 'generatepress' ) + ); +} diff --git a/wp-content/themes/generatepress/inc/structure/navigation.php b/wp-content/themes/generatepress/inc/structure/navigation.php index b89a7782..1104767d 100644 --- a/wp-content/themes/generatepress/inc/structure/navigation.php +++ b/wp-content/themes/generatepress/inc/structure/navigation.php @@ -1,635 +1,635 @@ - - - - - - - '; - generate_navigation_position(); - echo '
  • '; - } - } -} - -if ( ! function_exists( 'generate_add_navigation_before_left_sidebar' ) ) { - add_action( 'generate_before_left_sidebar_content', 'generate_add_navigation_before_left_sidebar', 5 ); - /** - * Generate the navigation based on settings - * - * It would be better to have all of these inside one action, but these - * are kept this way to maintain backward compatibility for people - * un-hooking and moving the navigation/changing the priority. - * - * @since 0.1 - */ - function generate_add_navigation_before_left_sidebar() { - if ( 'nav-left-sidebar' === generate_get_navigation_location() ) { - echo '
    '; - generate_navigation_position(); - echo '
    '; - } - } -} - -if ( ! class_exists( 'Generate_Page_Walker' ) && class_exists( 'Walker_Page' ) ) { - /** - * Add current-menu-item to the current item if no theme location is set - * This means we don't have to duplicate CSS properties for current_page_item and current-menu-item - * - * @since 1.3.21 - */ - class Generate_Page_Walker extends Walker_Page { - function start_el( &$output, $page, $depth = 0, $args = array(), $current_page = 0 ) { // phpcs:ignore - $css_class = array( 'page_item', 'page-item-' . $page->ID ); - $button = ''; - - if ( isset( $args['pages_with_children'][ $page->ID ] ) ) { - $css_class[] = 'menu-item-has-children'; - $icon = generate_get_svg_icon( 'arrow' ); - $button = '' . $icon . ''; - } - - if ( ! empty( $current_page ) ) { - $_current_page = get_post( $current_page ); - if ( $_current_page && in_array( $page->ID, $_current_page->ancestors ) ) { - $css_class[] = 'current-menu-ancestor'; - } - - if ( $page->ID == $current_page ) { // phpcs:ignore - $css_class[] = 'current-menu-item'; - } elseif ( $_current_page && $page->ID == $_current_page->post_parent ) { // phpcs:ignore - $css_class[] = 'current-menu-parent'; - } - } elseif ( $page->ID == get_option( 'page_for_posts' ) ) { // phpcs:ignore - $css_class[] = 'current-menu-parent'; - } - - // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound -- Core filter name. - $css_classes = implode( ' ', apply_filters( 'page_css_class', $css_class, $page, $depth, $args, $current_page ) ); - - $args['link_before'] = empty( $args['link_before'] ) ? '' : $args['link_before']; - $args['link_after'] = empty( $args['link_after'] ) ? '' : $args['link_after']; - - $output .= sprintf( - '
  • %s%s%s%s', - $css_classes, - get_permalink( $page->ID ), - $args['link_before'], - apply_filters( 'the_title', $page->post_title, $page->ID ), // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound -- Core filter name. - $args['link_after'], - $button - ); - } - } -} - -if ( ! function_exists( 'generate_dropdown_icon_to_menu_link' ) ) { - add_filter( 'nav_menu_item_title', 'generate_dropdown_icon_to_menu_link', 10, 4 ); - /** - * Add dropdown icon if menu item has children. - * - * @since 1.3.42 - * - * @param string $title The menu item title. - * @param WP_Post $item All of our menu item data. - * @param stdClass $args All of our menu item args. - * @param int $depth Depth of menu item. - * @return string The menu item. - */ - function generate_dropdown_icon_to_menu_link( $title, $item, $args, $depth ) { - $role = 'presentation'; - $tabindex = ''; - - if ( 'click-arrow' === generate_get_option( 'nav_dropdown_type' ) ) { - $role = 'button'; - $tabindex = ' tabindex="0"'; - } - - if ( isset( $args->container_class ) && 'main-nav' === $args->container_class ) { - foreach ( $item->classes as $value ) { - if ( 'menu-item-has-children' === $value ) { - $arrow_direction = 'down'; - - if ( 'primary' === $args->theme_location ) { - if ( 0 !== $depth ) { - $arrow_direction = 'right'; - - if ( 'left' === generate_get_option( 'nav_dropdown_direction' ) ) { - $arrow_direction = 'left'; - } - } - - if ( 'nav-left-sidebar' === generate_get_navigation_location() ) { - $arrow_direction = 'right'; - - if ( 'both-right' === generate_get_layout() ) { - $arrow_direction = 'left'; - } - } - - if ( 'nav-right-sidebar' === generate_get_navigation_location() ) { - $arrow_direction = 'left'; - - if ( 'both-left' === generate_get_layout() ) { - $arrow_direction = 'right'; - } - } - - if ( 'hover' !== generate_get_option( 'nav_dropdown_type' ) ) { - $arrow_direction = 'down'; - } - } - - $arrow_direction = apply_filters( 'generate_menu_item_dropdown_arrow_direction', $arrow_direction, $args, $depth ); - - if ( 'down' === $arrow_direction ) { - $arrow_direction = ''; - } else { - $arrow_direction = '-' . $arrow_direction; - } - - $icon = generate_get_svg_icon( 'arrow' . $arrow_direction ); - $title = $title . '' . $icon . ''; - } - } - } - - return $title; - } -} - -if ( ! function_exists( 'generate_navigation_search' ) ) { - add_action( 'generate_inside_navigation', 'generate_navigation_search' ); - /** - * Add the search bar to the navigation. - * - * @since 1.1.4 - */ - function generate_navigation_search() { - $generate_settings = wp_parse_args( - get_option( 'generate_settings', array() ), - generate_get_defaults() - ); - - if ( 'enable' !== $generate_settings['nav_search'] ) { - return; - } - - echo apply_filters( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped - 'generate_navigation_search_output', - sprintf( - '', - esc_url( home_url( '/' ) ), - esc_attr( get_search_query() ), - esc_attr_x( 'Search', 'label', 'generatepress' ) - ) - ); - } -} - -add_action( 'generate_after_primary_menu', 'generate_do_menu_bar_item_container' ); -add_action( 'generate_inside_mobile_menu_control_wrapper', 'generate_do_menu_bar_item_container' ); -/** - * Add a container for menu bar items. - * - * @since 3.0.0 - */ -function generate_do_menu_bar_item_container() { - if ( ! generate_is_using_flexbox() ) { - return; - } - - if ( generate_has_menu_bar_items() ) { - echo ''; - } -} - -add_action( 'wp', 'generate_add_menu_bar_items' ); -/** - * Add menu bar items to the primary navigation. - * - * @since 3.0.0 - */ -function generate_add_menu_bar_items() { - if ( ! generate_is_using_flexbox() ) { - return; - } - - if ( 'enable' === generate_get_option( 'nav_search' ) ) { - add_action( 'generate_menu_bar_items', 'generate_do_navigation_search_button' ); - } -} - -/** - * Add the navigation search button. - * - * @since 3.0.0 - */ -function generate_do_navigation_search_button() { - if ( ! generate_is_using_flexbox() ) { - return; - } - - if ( 'enable' !== generate_get_option( 'nav_search' ) ) { - return; - } - - $search_item = apply_filters( - 'generate_navigation_search_menu_item_output', - sprintf( - '%2$s', - esc_attr__( 'Open Search Bar', 'generatepress' ), - generate_get_svg_icon( 'search', true ) // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Escaped in function. - ) - ); - - echo $search_item; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- No escaping needed. -} - -if ( ! function_exists( 'generate_menu_search_icon' ) ) { - add_filter( 'wp_nav_menu_items', 'generate_menu_search_icon', 10, 2 ); - /** - * Add search icon to primary menu if set. - * Only used if using old float system. - * - * @since 1.2.9.7 - * - * @param string $nav The HTML list content for the menu items. - * @param stdClass $args An object containing wp_nav_menu() arguments. - * @return string The search icon menu item. - */ - function generate_menu_search_icon( $nav, $args ) { - $generate_settings = wp_parse_args( - get_option( 'generate_settings', array() ), - generate_get_defaults() - ); - - if ( generate_is_using_flexbox() ) { - return $nav; - } - - // If the search icon isn't enabled, return the regular nav. - if ( 'enable' !== $generate_settings['nav_search'] ) { - return $nav; - } - - // If our primary menu is set, add the search icon. - if ( isset( $args->theme_location ) && 'primary' === $args->theme_location ) { - $search_item = apply_filters( - 'generate_navigation_search_menu_item_output', - sprintf( - '
  • ', - esc_attr__( 'Open Search Bar', 'generatepress' ), - generate_get_svg_icon( 'search', true ) // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Escaped in function. - ) - ); - - return $nav . $search_item; - } - - // Our primary menu isn't set, return the regular nav. - // In this case, the search icon is added to the generate_menu_fallback() function in navigation.php. - return $nav; - } -} - -if ( ! function_exists( 'generate_mobile_menu_search_icon' ) ) { - add_action( 'generate_inside_navigation', 'generate_mobile_menu_search_icon' ); - /** - * Add search icon to mobile menu bar. - * Only used if using old float system. - * - * @since 1.3.12 - */ - function generate_mobile_menu_search_icon() { - $generate_settings = wp_parse_args( - get_option( 'generate_settings', array() ), - generate_get_defaults() - ); - - // If the search icon isn't enabled, return the regular nav. - if ( 'enable' !== $generate_settings['nav_search'] ) { - return; - } - - if ( generate_is_using_flexbox() ) { - return; - } - - ?> -
    - - - - - - -
    - - - + + + + + + '; + generate_navigation_position(); + echo '
    '; + } + } +} + +if ( ! function_exists( 'generate_add_navigation_before_left_sidebar' ) ) { + add_action( 'generate_before_left_sidebar_content', 'generate_add_navigation_before_left_sidebar', 5 ); + /** + * Generate the navigation based on settings + * + * It would be better to have all of these inside one action, but these + * are kept this way to maintain backward compatibility for people + * un-hooking and moving the navigation/changing the priority. + * + * @since 0.1 + */ + function generate_add_navigation_before_left_sidebar() { + if ( 'nav-left-sidebar' === generate_get_navigation_location() ) { + echo '
    '; + generate_navigation_position(); + echo '
    '; + } + } +} + +if ( ! class_exists( 'Generate_Page_Walker' ) && class_exists( 'Walker_Page' ) ) { + /** + * Add current-menu-item to the current item if no theme location is set + * This means we don't have to duplicate CSS properties for current_page_item and current-menu-item + * + * @since 1.3.21 + */ + class Generate_Page_Walker extends Walker_Page { + function start_el( &$output, $page, $depth = 0, $args = array(), $current_page = 0 ) { // phpcs:ignore + $css_class = array( 'page_item', 'page-item-' . $page->ID ); + $button = ''; + + if ( isset( $args['pages_with_children'][ $page->ID ] ) ) { + $css_class[] = 'menu-item-has-children'; + $icon = generate_get_svg_icon( 'arrow' ); + $button = '' . $icon . ''; + } + + if ( ! empty( $current_page ) ) { + $_current_page = get_post( $current_page ); + if ( $_current_page && in_array( $page->ID, $_current_page->ancestors ) ) { + $css_class[] = 'current-menu-ancestor'; + } + + if ( $page->ID == $current_page ) { // phpcs:ignore + $css_class[] = 'current-menu-item'; + } elseif ( $_current_page && $page->ID == $_current_page->post_parent ) { // phpcs:ignore + $css_class[] = 'current-menu-parent'; + } + } elseif ( $page->ID == get_option( 'page_for_posts' ) ) { // phpcs:ignore + $css_class[] = 'current-menu-parent'; + } + + // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound -- Core filter name. + $css_classes = implode( ' ', apply_filters( 'page_css_class', $css_class, $page, $depth, $args, $current_page ) ); + + $args['link_before'] = empty( $args['link_before'] ) ? '' : $args['link_before']; + $args['link_after'] = empty( $args['link_after'] ) ? '' : $args['link_after']; + + $output .= sprintf( + '
  • %s%s%s%s', + $css_classes, + get_permalink( $page->ID ), + $args['link_before'], + apply_filters( 'the_title', $page->post_title, $page->ID ), // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound -- Core filter name. + $args['link_after'], + $button + ); + } + } +} + +if ( ! function_exists( 'generate_dropdown_icon_to_menu_link' ) ) { + add_filter( 'nav_menu_item_title', 'generate_dropdown_icon_to_menu_link', 10, 4 ); + /** + * Add dropdown icon if menu item has children. + * + * @since 1.3.42 + * + * @param string $title The menu item title. + * @param WP_Post $item All of our menu item data. + * @param stdClass $args All of our menu item args. + * @param int $depth Depth of menu item. + * @return string The menu item. + */ + function generate_dropdown_icon_to_menu_link( $title, $item, $args, $depth ) { + $role = 'presentation'; + $tabindex = ''; + + if ( 'click-arrow' === generate_get_option( 'nav_dropdown_type' ) ) { + $role = 'button'; + $tabindex = ' tabindex="0"'; + } + + if ( isset( $args->container_class ) && 'main-nav' === $args->container_class ) { + foreach ( $item->classes as $value ) { + if ( 'menu-item-has-children' === $value ) { + $arrow_direction = 'down'; + + if ( 'primary' === $args->theme_location ) { + if ( 0 !== $depth ) { + $arrow_direction = 'right'; + + if ( 'left' === generate_get_option( 'nav_dropdown_direction' ) ) { + $arrow_direction = 'left'; + } + } + + if ( 'nav-left-sidebar' === generate_get_navigation_location() ) { + $arrow_direction = 'right'; + + if ( 'both-right' === generate_get_layout() ) { + $arrow_direction = 'left'; + } + } + + if ( 'nav-right-sidebar' === generate_get_navigation_location() ) { + $arrow_direction = 'left'; + + if ( 'both-left' === generate_get_layout() ) { + $arrow_direction = 'right'; + } + } + + if ( 'hover' !== generate_get_option( 'nav_dropdown_type' ) ) { + $arrow_direction = 'down'; + } + } + + $arrow_direction = apply_filters( 'generate_menu_item_dropdown_arrow_direction', $arrow_direction, $args, $depth ); + + if ( 'down' === $arrow_direction ) { + $arrow_direction = ''; + } else { + $arrow_direction = '-' . $arrow_direction; + } + + $icon = generate_get_svg_icon( 'arrow' . $arrow_direction ); + $title = $title . '' . $icon . ''; + } + } + } + + return $title; + } +} + +if ( ! function_exists( 'generate_navigation_search' ) ) { + add_action( 'generate_inside_navigation', 'generate_navigation_search' ); + /** + * Add the search bar to the navigation. + * + * @since 1.1.4 + */ + function generate_navigation_search() { + $generate_settings = wp_parse_args( + get_option( 'generate_settings', array() ), + generate_get_defaults() + ); + + if ( 'enable' !== $generate_settings['nav_search'] ) { + return; + } + + echo apply_filters( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped + 'generate_navigation_search_output', + sprintf( + '', + esc_url( home_url( '/' ) ), + esc_attr( get_search_query() ), + esc_attr_x( 'Search', 'label', 'generatepress' ) + ) + ); + } +} + +add_action( 'generate_after_primary_menu', 'generate_do_menu_bar_item_container' ); +add_action( 'generate_inside_mobile_menu_control_wrapper', 'generate_do_menu_bar_item_container' ); +/** + * Add a container for menu bar items. + * + * @since 3.0.0 + */ +function generate_do_menu_bar_item_container() { + if ( ! generate_is_using_flexbox() ) { + return; + } + + if ( generate_has_menu_bar_items() ) { + echo ''; + } +} + +add_action( 'wp', 'generate_add_menu_bar_items' ); +/** + * Add menu bar items to the primary navigation. + * + * @since 3.0.0 + */ +function generate_add_menu_bar_items() { + if ( ! generate_is_using_flexbox() ) { + return; + } + + if ( 'enable' === generate_get_option( 'nav_search' ) ) { + add_action( 'generate_menu_bar_items', 'generate_do_navigation_search_button' ); + } +} + +/** + * Add the navigation search button. + * + * @since 3.0.0 + */ +function generate_do_navigation_search_button() { + if ( ! generate_is_using_flexbox() ) { + return; + } + + if ( 'enable' !== generate_get_option( 'nav_search' ) ) { + return; + } + + $search_item = apply_filters( + 'generate_navigation_search_menu_item_output', + sprintf( + '%2$s', + esc_attr__( 'Open Search Bar', 'generatepress' ), + generate_get_svg_icon( 'search', true ) // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Escaped in function. + ) + ); + + echo $search_item; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- No escaping needed. +} + +if ( ! function_exists( 'generate_menu_search_icon' ) ) { + add_filter( 'wp_nav_menu_items', 'generate_menu_search_icon', 10, 2 ); + /** + * Add search icon to primary menu if set. + * Only used if using old float system. + * + * @since 1.2.9.7 + * + * @param string $nav The HTML list content for the menu items. + * @param stdClass $args An object containing wp_nav_menu() arguments. + * @return string The search icon menu item. + */ + function generate_menu_search_icon( $nav, $args ) { + $generate_settings = wp_parse_args( + get_option( 'generate_settings', array() ), + generate_get_defaults() + ); + + if ( generate_is_using_flexbox() ) { + return $nav; + } + + // If the search icon isn't enabled, return the regular nav. + if ( 'enable' !== $generate_settings['nav_search'] ) { + return $nav; + } + + // If our primary menu is set, add the search icon. + if ( isset( $args->theme_location ) && 'primary' === $args->theme_location ) { + $search_item = apply_filters( + 'generate_navigation_search_menu_item_output', + sprintf( + '
  • ', + esc_attr__( 'Open Search Bar', 'generatepress' ), + generate_get_svg_icon( 'search', true ) // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Escaped in function. + ) + ); + + return $nav . $search_item; + } + + // Our primary menu isn't set, return the regular nav. + // In this case, the search icon is added to the generate_menu_fallback() function in navigation.php. + return $nav; + } +} + +if ( ! function_exists( 'generate_mobile_menu_search_icon' ) ) { + add_action( 'generate_inside_navigation', 'generate_mobile_menu_search_icon' ); + /** + * Add search icon to mobile menu bar. + * Only used if using old float system. + * + * @since 1.3.12 + */ + function generate_mobile_menu_search_icon() { + $generate_settings = wp_parse_args( + get_option( 'generate_settings', array() ), + generate_get_defaults() + ); + + // If the search icon isn't enabled, return the regular nav. + if ( 'enable' !== $generate_settings['nav_search'] ) { + return; + } + + if ( generate_is_using_flexbox() ) { + return; + } + + ?> +
    + + + + + + +
    + + + post_parent ) : get_adjacent_post( false, '', true ); - $next = get_adjacent_post( false, '', false ); - - if ( ! $next && ! $previous ) { - return; - } - } - - // Don't print empty markup in archives if there's only one page. - if ( $wp_query->max_num_pages < 2 && ( is_home() || is_archive() || is_search() ) ) { - return; - } - - $nav_class = ( is_single() ) ? 'post-navigation' : 'paging-navigation'; - ?> - - %3$s
    '; - } - - return $template; - } -} - -/** - * Output requested post meta. - * - * @since 2.3 - * - * @param string $item The post meta item we're requesting. - */ -function generate_do_post_meta_item( $item ) { - if ( 'date' === $item ) { - $time_string = ''; - - $updated_time = get_the_modified_time( 'U' ); - $published_time = get_the_time( 'U' ) + 1800; - $schema_type = generate_get_schema_type(); - - if ( $updated_time > $published_time ) { - if ( apply_filters( 'generate_post_date_show_updated_only', false ) ) { - $time_string = ''; - } else { - $time_string = '' . $time_string; - } - } - - $time_string = sprintf( - $time_string, - esc_attr( get_the_date( 'c' ) ), - esc_html( get_the_date() ), - esc_attr( get_the_modified_date( 'c' ) ), - esc_html( get_the_modified_date() ), - 'microdata' === $schema_type ? ' itemprop="datePublished"' : '', - 'microdata' === $schema_type ? ' itemprop="dateModified"' : '' - ); - - $posted_on = '%1$s%4$s '; - - if ( apply_filters( 'generate_post_date_link', false ) ) { - $posted_on = '%1$s%4$s '; - } - - echo apply_filters( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped - 'generate_post_date_output', - sprintf( - $posted_on, - apply_filters( 'generate_inside_post_meta_item_output', '', 'date' ), - esc_url( get_permalink() ), - esc_attr( get_the_time() ), - $time_string - ), - $time_string, - $posted_on - ); - } - - if ( 'author' === $item ) { - $schema_type = generate_get_schema_type(); - - $byline = ' '; - - if ( ! apply_filters( 'generate_post_author_link', true ) ) { - $byline = ' '; - } - - echo apply_filters( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped - 'generate_post_author_output', - sprintf( - $byline, - apply_filters( 'generate_inside_post_meta_item_output', '', 'author' ), - esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), - /* translators: 1: Author name */ - esc_attr( sprintf( __( 'View all posts by %s', 'generatepress' ), get_the_author() ) ), - esc_html( get_the_author() ), - generate_get_microdata( 'post-author' ), - 'microdata' === $schema_type ? ' itemprop="url"' : '', - 'microdata' === $schema_type ? ' itemprop="name"' : '', - generate_is_using_hatom() ? ' vcard' : '' - ) - ); - } - - if ( 'categories' === $item ) { - $term_separator = apply_filters( 'generate_term_separator', _x( ', ', 'Used between list items, there is a space after the comma.', 'generatepress' ), 'categories' ); - $categories_list = get_the_category_list( $term_separator ); - - if ( $categories_list ) { - echo apply_filters( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped - 'generate_category_list_output', - sprintf( - '%3$s%1$s %2$s ', - esc_html_x( 'Categories', 'Used before category names.', 'generatepress' ), - $categories_list, - apply_filters( 'generate_inside_post_meta_item_output', '', 'categories' ) - ) - ); - } - } - - if ( 'tags' === $item ) { - $term_separator = apply_filters( 'generate_term_separator', _x( ', ', 'Used between list items, there is a space after the comma.', 'generatepress' ), 'tags' ); - $tags_list = get_the_tag_list( '', $term_separator ); - - if ( $tags_list ) { - echo apply_filters( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped - 'generate_tag_list_output', - sprintf( - '%3$s%1$s %2$s ', - esc_html_x( 'Tags', 'Used before tag names.', 'generatepress' ), - $tags_list, - apply_filters( 'generate_inside_post_meta_item_output', '', 'tags' ) - ) - ); - } - } - - if ( 'comments-link' === $item ) { - if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) { - echo ''; - echo apply_filters( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped - 'generate_inside_post_meta_item_output', - '', - 'comments-link' - ); - comments_popup_link( __( 'Leave a comment', 'generatepress' ), __( '1 Comment', 'generatepress' ), __( '% Comments', 'generatepress' ) ); - echo ' '; - } - } - - if ( 'post-navigation' === $item && is_single() ) { - generate_content_nav( 'nav-below' ); - } - - /** - * generate_post_meta_items hook. - * - * @since 2.4 - */ - do_action( 'generate_post_meta_items', $item ); -} - -add_filter( 'generate_inside_post_meta_item_output', 'generate_do_post_meta_prefix', 10, 2 ); -/** - * Add svg icons or text to our post meta output. - * - * @since 2.4 - * @param string $output The existing output. - * @param string $item The item to target. - */ -function generate_do_post_meta_prefix( $output, $item ) { - if ( 'author' === $item ) { - $output = __( 'by', 'generatepress' ) . ' '; - } - - if ( 'categories' === $item ) { - $output = generate_get_svg_icon( 'categories' ); - } - - if ( 'tags' === $item ) { - $output = generate_get_svg_icon( 'tags' ); - } - - if ( 'comments-link' === $item ) { - $output = generate_get_svg_icon( 'comments' ); - } - - return $output; -} - -/** - * Remove post meta items from display if their individual filters are set. - * - * @since 3.0.0 - * @param array $items The post meta items. - */ -function generate_disable_post_meta_items( $items ) { - $disable_filter_names = apply_filters( - 'generate_disable_post_meta_filter_names', - array( - 'date' => 'generate_post_date', - 'author' => 'generate_post_author', - 'categories' => 'generate_show_categories', - 'tags' => 'generate_show_tags', - 'comments-link' => 'generate_show_comments', - 'post-navigation' => 'generate_show_post_navigation', - ) - ); - - foreach ( $items as $item ) { - $default_display = true; - - if ( 'comments-link' === $item && is_singular() ) { - $default_display = false; - } - - // phpcs:ignore -- Hook name is coming from a variable. - if ( isset( $disable_filter_names[ $item ] ) && ! apply_filters( $disable_filter_names[ $item ], $default_display ) ) { - $items = array_diff( $items, array( $item ) ); - } - } - - return $items; -} - -/** - * Get the post meta items in the header entry meta. - * - * @since 3.0.0 - */ -function generate_get_header_entry_meta_items() { - $items = apply_filters( - 'generate_header_entry_meta_items', - array( - 'date', - 'author', - ) - ); - - // Disable post meta items based on their individual filters. - $items = generate_disable_post_meta_items( $items ); - - return $items; -} - -/** - * Get the post meta items in the footer entry meta. - * - * @since 3.0.0 - */ -function generate_get_footer_entry_meta_items() { - $items = apply_filters( - 'generate_footer_entry_meta_items', - array( - 'categories', - 'tags', - 'comments-link', - 'post-navigation', - ) - ); - - /** - * This wasn't a "meta item" prior to 3.0.0 and some users may be using the filter above - * without specifying that they want to include post-navigation. The below forces it to display - * for users using the old float system to prevent it from disappearing on update. - */ - if ( ! generate_is_using_flexbox() && ! in_array( 'post-navigation', (array) $items ) ) { - $items[] = 'post-navigation'; - } - - // Disable post meta items based on their individual filters. - $items = generate_disable_post_meta_items( $items ); - - return $items; -} - -if ( ! function_exists( 'generate_posted_on' ) ) { - /** - * Prints HTML with meta information for the current post-date/time and author. - * - * @since 0.1 - */ - function generate_posted_on() { - $items = generate_get_header_entry_meta_items(); - - foreach ( $items as $item ) { - generate_do_post_meta_item( $item ); - } - } -} - -if ( ! function_exists( 'generate_entry_meta' ) ) { - /** - * Prints HTML with meta information for the categories, tags. - * - * @since 1.2.5 - */ - function generate_entry_meta() { - $items = generate_get_footer_entry_meta_items(); - - foreach ( $items as $item ) { - generate_do_post_meta_item( $item ); - } - } -} - -if ( ! function_exists( 'generate_excerpt_more' ) ) { - add_filter( 'excerpt_more', 'generate_excerpt_more' ); - /** - * Prints the read more HTML to post excerpts. - * - * @since 0.1 - * - * @param string $more The string shown within the more link. - * @return string The HTML for the more link. - */ - function generate_excerpt_more( $more ) { - return apply_filters( - 'generate_excerpt_more_output', - sprintf( - ' ... %3$s', - the_title_attribute( 'echo=0' ), - esc_url( get_permalink( get_the_ID() ) ), - __( 'Read more', 'generatepress' ), - sprintf( - /* translators: Aria-label describing the read more button */ - _x( 'More on %s', 'more on post title', 'generatepress' ), - the_title_attribute( 'echo=0' ) - ) - ) - ); - } -} - -if ( ! function_exists( 'generate_content_more' ) ) { - add_filter( 'the_content_more_link', 'generate_content_more' ); - /** - * Prints the read more HTML to post content using the more tag. - * - * @since 0.1 - * - * @param string $more The string shown within the more link. - * @return string The HTML for the more link - */ - function generate_content_more( $more ) { - return apply_filters( - 'generate_content_more_link_output', - sprintf( - '

    %3$s

    ', - the_title_attribute( 'echo=0' ), - esc_url( get_permalink( get_the_ID() ) . apply_filters( 'generate_more_jump', '#more-' . get_the_ID() ) ), - __( 'Read more', 'generatepress' ), - sprintf( - /* translators: Aria-label describing the read more button */ - _x( 'More on %s', 'more on post title', 'generatepress' ), - the_title_attribute( 'echo=0' ) - ) - ) - ); - } -} - -add_action( 'wp', 'generate_add_post_meta', 5 ); -/** - * Add our post meta items to the page. - * - * @since 3.0.0 - */ -function generate_add_post_meta() { - $header_items = generate_get_header_entry_meta_items(); - - $header_post_types = apply_filters( - 'generate_entry_meta_post_types', - array( - 'post', - ) - ); - - if ( in_array( get_post_type(), $header_post_types ) && ! empty( $header_items ) ) { - add_action( 'generate_after_entry_title', 'generate_post_meta' ); - } - - $footer_items = generate_get_footer_entry_meta_items(); - - $footer_post_types = apply_filters( - 'generate_footer_meta_post_types', - array( - 'post', - ) - ); - - if ( in_array( get_post_type(), $footer_post_types ) && ! empty( $footer_items ) ) { - add_action( 'generate_after_entry_content', 'generate_footer_meta' ); - } -} - -if ( ! function_exists( 'generate_post_meta' ) ) { - /** - * Build the post meta. - * - * @since 1.3.29 - */ - function generate_post_meta() { - ?> - - -
    - -
    - post_parent ) : get_adjacent_post( false, '', true ); + $next = get_adjacent_post( false, '', false ); + + if ( ! $next && ! $previous ) { + return; + } + } + + // Don't print empty markup in archives if there's only one page. + if ( $wp_query->max_num_pages < 2 && ( is_home() || is_archive() || is_search() ) ) { + return; + } + + $nav_class = ( is_single() ) ? 'post-navigation' : 'paging-navigation'; + ?> + + %3$s
    '; + } + + return $template; + } +} + +/** + * Output requested post meta. + * + * @since 2.3 + * + * @param string $item The post meta item we're requesting. + */ +function generate_do_post_meta_item( $item ) { + if ( 'date' === $item ) { + $time_string = ''; + + $updated_time = get_the_modified_time( 'U' ); + $published_time = get_the_time( 'U' ) + 1800; + $schema_type = generate_get_schema_type(); + + if ( $updated_time > $published_time ) { + if ( apply_filters( 'generate_post_date_show_updated_only', false ) ) { + $time_string = ''; + } else { + $time_string = '' . $time_string; + } + } + + $time_string = sprintf( + $time_string, + esc_attr( get_the_date( 'c' ) ), + esc_html( get_the_date() ), + esc_attr( get_the_modified_date( 'c' ) ), + esc_html( get_the_modified_date() ), + 'microdata' === $schema_type ? ' itemprop="datePublished"' : '', + 'microdata' === $schema_type ? ' itemprop="dateModified"' : '' + ); + + $posted_on = '%1$s%4$s '; + + if ( apply_filters( 'generate_post_date_link', false ) ) { + $posted_on = '%1$s%4$s '; + } + + echo apply_filters( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped + 'generate_post_date_output', + sprintf( + $posted_on, + apply_filters( 'generate_inside_post_meta_item_output', '', 'date' ), + esc_url( get_permalink() ), + esc_attr( get_the_time() ), + $time_string + ), + $time_string, + $posted_on + ); + } + + if ( 'author' === $item ) { + $schema_type = generate_get_schema_type(); + + $byline = '%1$s '; + + if ( ! apply_filters( 'generate_post_author_link', true ) ) { + $byline = '%1$s%4$s '; + } + + echo apply_filters( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped + 'generate_post_author_output', + sprintf( + $byline, + apply_filters( 'generate_inside_post_meta_item_output', '', 'author' ), + esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), + /* translators: 1: Author name */ + esc_attr( sprintf( __( 'View all posts by %s', 'generatepress' ), get_the_author() ) ), + esc_html( get_the_author() ), + generate_get_microdata( 'post-author' ), + 'microdata' === $schema_type ? ' itemprop="url"' : '', + 'microdata' === $schema_type ? ' itemprop="name"' : '', + generate_is_using_hatom() ? ' vcard' : '' + ) + ); + } + + if ( 'categories' === $item ) { + $term_separator = apply_filters( 'generate_term_separator', _x( ', ', 'Used between list items, there is a space after the comma.', 'generatepress' ), 'categories' ); + $categories_list = get_the_category_list( $term_separator ); + + if ( $categories_list ) { + echo apply_filters( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped + 'generate_category_list_output', + sprintf( + '%3$s%1$s %2$s ', + esc_html_x( 'Categories', 'Used before category names.', 'generatepress' ), + $categories_list, + apply_filters( 'generate_inside_post_meta_item_output', '', 'categories' ) + ) + ); + } + } + + if ( 'tags' === $item ) { + $term_separator = apply_filters( 'generate_term_separator', _x( ', ', 'Used between list items, there is a space after the comma.', 'generatepress' ), 'tags' ); + $tags_list = get_the_tag_list( '', $term_separator ); + + if ( $tags_list ) { + echo apply_filters( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped + 'generate_tag_list_output', + sprintf( + '%3$s%1$s %2$s ', + esc_html_x( 'Tags', 'Used before tag names.', 'generatepress' ), + $tags_list, + apply_filters( 'generate_inside_post_meta_item_output', '', 'tags' ) + ) + ); + } + } + + if ( 'comments-link' === $item ) { + if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) { + echo ''; + echo apply_filters( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped + 'generate_inside_post_meta_item_output', + '', + 'comments-link' + ); + comments_popup_link( __( 'Leave a comment', 'generatepress' ), __( '1 Comment', 'generatepress' ), __( '% Comments', 'generatepress' ) ); + echo ' '; + } + } + + if ( 'post-navigation' === $item && is_single() ) { + generate_content_nav( 'nav-below' ); + } + + /** + * generate_post_meta_items hook. + * + * @since 2.4 + */ + do_action( 'generate_post_meta_items', $item ); +} + +add_filter( 'generate_inside_post_meta_item_output', 'generate_do_post_meta_prefix', 10, 2 ); +/** + * Add svg icons or text to our post meta output. + * + * @since 2.4 + * @param string $output The existing output. + * @param string $item The item to target. + */ +function generate_do_post_meta_prefix( $output, $item ) { + if ( 'author' === $item ) { + $output = __( 'by', 'generatepress' ) . ' '; + } + + if ( 'categories' === $item ) { + $output = generate_get_svg_icon( 'categories' ); + } + + if ( 'tags' === $item ) { + $output = generate_get_svg_icon( 'tags' ); + } + + if ( 'comments-link' === $item ) { + $output = generate_get_svg_icon( 'comments' ); + } + + return $output; +} + +/** + * Remove post meta items from display if their individual filters are set. + * + * @since 3.0.0 + * @param array $items The post meta items. + */ +function generate_disable_post_meta_items( $items ) { + $disable_filter_names = apply_filters( + 'generate_disable_post_meta_filter_names', + array( + 'date' => 'generate_post_date', + 'author' => 'generate_post_author', + 'categories' => 'generate_show_categories', + 'tags' => 'generate_show_tags', + 'comments-link' => 'generate_show_comments', + 'post-navigation' => 'generate_show_post_navigation', + ) + ); + + foreach ( $items as $item ) { + $default_display = true; + + if ( 'comments-link' === $item && is_singular() ) { + $default_display = false; + } + + // phpcs:ignore -- Hook name is coming from a variable. + if ( isset( $disable_filter_names[ $item ] ) && ! apply_filters( $disable_filter_names[ $item ], $default_display ) ) { + $items = array_diff( $items, array( $item ) ); + } + } + + return $items; +} + +/** + * Get the post meta items in the header entry meta. + * + * @since 3.0.0 + */ +function generate_get_header_entry_meta_items() { + $items = apply_filters( + 'generate_header_entry_meta_items', + array( + 'date', + 'author', + ) + ); + + // Disable post meta items based on their individual filters. + $items = generate_disable_post_meta_items( $items ); + + return $items; +} + +/** + * Get the post meta items in the footer entry meta. + * + * @since 3.0.0 + */ +function generate_get_footer_entry_meta_items() { + $items = apply_filters( + 'generate_footer_entry_meta_items', + array( + 'categories', + 'tags', + 'comments-link', + 'post-navigation', + ) + ); + + /** + * This wasn't a "meta item" prior to 3.0.0 and some users may be using the filter above + * without specifying that they want to include post-navigation. The below forces it to display + * for users using the old float system to prevent it from disappearing on update. + */ + if ( ! generate_is_using_flexbox() && ! in_array( 'post-navigation', (array) $items ) ) { + $items[] = 'post-navigation'; + } + + // Disable post meta items based on their individual filters. + $items = generate_disable_post_meta_items( $items ); + + return $items; +} + +if ( ! function_exists( 'generate_posted_on' ) ) { + /** + * Prints HTML with meta information for the current post-date/time and author. + * + * @since 0.1 + */ + function generate_posted_on() { + $items = generate_get_header_entry_meta_items(); + + foreach ( $items as $item ) { + generate_do_post_meta_item( $item ); + } + } +} + +if ( ! function_exists( 'generate_entry_meta' ) ) { + /** + * Prints HTML with meta information for the categories, tags. + * + * @since 1.2.5 + */ + function generate_entry_meta() { + $items = generate_get_footer_entry_meta_items(); + + foreach ( $items as $item ) { + generate_do_post_meta_item( $item ); + } + } +} + +if ( ! function_exists( 'generate_excerpt_more' ) ) { + add_filter( 'excerpt_more', 'generate_excerpt_more' ); + /** + * Prints the read more HTML to post excerpts. + * + * @since 0.1 + * + * @param string $more The string shown within the more link. + * @return string The HTML for the more link. + */ + function generate_excerpt_more( $more ) { + return apply_filters( + 'generate_excerpt_more_output', + sprintf( + ' ... %3$s', + the_title_attribute( 'echo=0' ), + esc_url( get_permalink( get_the_ID() ) ), + __( 'Read more', 'generatepress' ), + sprintf( + /* translators: Aria-label describing the read more button */ + _x( 'More on %s', 'more on post title', 'generatepress' ), + the_title_attribute( 'echo=0' ) + ) + ) + ); + } +} + +if ( ! function_exists( 'generate_content_more' ) ) { + add_filter( 'the_content_more_link', 'generate_content_more' ); + /** + * Prints the read more HTML to post content using the more tag. + * + * @since 0.1 + * + * @param string $more The string shown within the more link. + * @return string The HTML for the more link + */ + function generate_content_more( $more ) { + return apply_filters( + 'generate_content_more_link_output', + sprintf( + '

    %3$s

    ', + the_title_attribute( 'echo=0' ), + esc_url( get_permalink( get_the_ID() ) . apply_filters( 'generate_more_jump', '#more-' . get_the_ID() ) ), + __( 'Read more', 'generatepress' ), + sprintf( + /* translators: Aria-label describing the read more button */ + _x( 'More on %s', 'more on post title', 'generatepress' ), + the_title_attribute( 'echo=0' ) + ) + ) + ); + } +} + +add_action( 'wp', 'generate_add_post_meta', 5 ); +/** + * Add our post meta items to the page. + * + * @since 3.0.0 + */ +function generate_add_post_meta() { + $header_items = generate_get_header_entry_meta_items(); + + $header_post_types = apply_filters( + 'generate_entry_meta_post_types', + array( + 'post', + ) + ); + + if ( in_array( get_post_type(), $header_post_types ) && ! empty( $header_items ) ) { + add_action( 'generate_after_entry_title', 'generate_post_meta' ); + } + + $footer_items = generate_get_footer_entry_meta_items(); + + $footer_post_types = apply_filters( + 'generate_footer_meta_post_types', + array( + 'post', + ) + ); + + if ( in_array( get_post_type(), $footer_post_types ) && ! empty( $footer_items ) ) { + add_action( 'generate_after_entry_content', 'generate_footer_meta' ); + } +} + +if ( ! function_exists( 'generate_post_meta' ) ) { + /** + * Build the post meta. + * + * @since 1.3.29 + */ + function generate_post_meta() { + ?> +
    + +
    + + + post_content, '' ) ); - - $format = ( false !== get_post_format() ) ? get_post_format() : 'standard'; - - $show_excerpt = ( 'excerpt' === generate_get_option( 'post_content' ) ) ? true : false; - - $show_excerpt = ( 'standard' !== $format ) ? false : $show_excerpt; - - $show_excerpt = ( $more_tag ) ? false : $show_excerpt; - - $show_excerpt = ( is_search() ) ? true : $show_excerpt; - - return apply_filters( 'generate_show_excerpt', $show_excerpt ); - } -} - -if ( ! function_exists( 'generate_show_title' ) ) { - /** - * Check to see if we should show our page/post title or not. - * - * @since 1.3.18 - * - * @return bool Whether to show the content title. - */ - function generate_show_title() { - return apply_filters( 'generate_show_title', true ); - } -} - -/** - * Check whether we should display the entry header or not. - * - * @since 3.0.0 - */ -function generate_show_entry_header() { - $show_entry_header = true; - $show_title = generate_show_title(); - $has_before_entry_title = has_action( 'generate_before_entry_title' ); - $has_after_entry_title = has_action( 'generate_after_entry_title' ); - - if ( is_page() ) { - $has_before_entry_title = has_action( 'generate_before_page_title' ); - $has_after_entry_title = has_action( 'generate_after_page_title' ); - } - - if ( ! $show_title && ! $has_before_entry_title && ! $has_after_entry_title ) { - $show_entry_header = false; - } - - return apply_filters( 'generate_show_entry_header', $show_entry_header ); -} - -if ( ! function_exists( 'generate_get_premium_url' ) ) { - /** - * Generate a URL to our premium add-ons. - * Allows the use of a referral ID and campaign. - * - * @since 1.3.42 - * - * @param string $url URL to premium page. - * @param bool $trailing_slash Whether we want to include a trailing slash. - * @return string The URL to generatepress.com. - */ - function generate_get_premium_url( $url = 'https://generatepress.com/premium', $trailing_slash = true ) { - if ( $trailing_slash ) { - $url = trailingslashit( $url ); - } - - $args = apply_filters( - 'generate_premium_url_args', - array( - 'ref' => null, - 'campaign' => null, - ) - ); - - if ( isset( $args['ref'] ) ) { - $url = add_query_arg( 'ref', absint( $args['ref'] ), $url ); - } - - if ( isset( $args['campaign'] ) ) { - $url = add_query_arg( 'campaign', sanitize_text_field( $args['campaign'] ), $url ); - } - - return esc_url( $url ); - } -} - -if ( ! function_exists( 'generate_padding_css' ) ) { - /** - * Shorten our padding/margin values into shorthand form. - * - * @since 0.1 - * - * @param int $top Top spacing. - * @param int $right Right spacing. - * @param int $bottom Bottom spacing. - * @param int $left Left spacing. - * @return string Element spacing values. - */ - function generate_padding_css( $top, $right, $bottom, $left ) { - $padding_top = ( isset( $top ) && '' !== $top ) ? absint( $top ) . 'px ' : '0px '; - $padding_right = ( isset( $right ) && '' !== $right ) ? absint( $right ) . 'px ' : '0px '; - $padding_bottom = ( isset( $bottom ) && '' !== $bottom ) ? absint( $bottom ) . 'px ' : '0px '; - $padding_left = ( isset( $left ) && '' !== $left ) ? absint( $left ) . 'px' : '0px'; - - if ( ( absint( $padding_top ) === absint( $padding_right ) ) && ( absint( $padding_right ) === absint( $padding_bottom ) ) && ( absint( $padding_bottom ) === absint( $padding_left ) ) ) { - return $padding_left; - } - - return $padding_top . $padding_right . $padding_bottom . $padding_left; - } -} - -if ( ! function_exists( 'generate_get_link_url' ) ) { - /** - * Return the post URL. - * - * Falls back to the post permalink if no URL is found in the post. - * - * @since 1.2.5 - * - * @see get_url_in_content() - * @return string The Link format URL. - */ - function generate_get_link_url() { - $has_url = get_url_in_content( get_the_content() ); - - // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound -- Core filter name. - return $has_url ? $has_url : apply_filters( 'the_permalink', get_permalink() ); - } -} - -if ( ! function_exists( 'generate_get_navigation_location' ) ) { - /** - * Get the location of the navigation and filter it. - * - * @since 1.3.41 - * - * @return string The primary menu location. - */ - function generate_get_navigation_location() { - return apply_filters( 'generate_navigation_location', generate_get_option( 'nav_position_setting' ) ); - } -} - -/** - * Check if the logo and site branding are active. - * - * @since 2.3 - */ -function generate_has_logo_site_branding() { - $has_site_title = ! generate_get_option( 'hide_title' ) && get_bloginfo( 'title' ); - $has_site_tagline = ! generate_get_option( 'hide_tagline' ) && get_bloginfo( 'description' ); - - if ( get_theme_mod( 'custom_logo' ) && ( $has_site_title || $has_site_tagline ) ) { - return true; - } - - return false; -} - -/** - * Create SVG icons. - * - * @since 2.3 - * - * @param string $icon The icon to get. - * @param bool $replace Whether we're replacing an icon on action (click). - */ -function generate_get_svg_icon( $icon, $replace = false ) { - if ( 'svg' !== generate_get_option( 'icons' ) ) { - return; - } - - $output = ''; - - if ( 'menu-bars' === $icon ) { - $output = ''; - } - - if ( 'close' === $icon ) { - $output = ''; - } - - if ( 'search' === $icon ) { - $output = ''; - } - - if ( 'categories' === $icon ) { - $output = ''; - } - - if ( 'tags' === $icon ) { - $output = ''; - } - - if ( 'comments' === $icon ) { - $output = ''; - } - - if ( 'arrow' === $icon ) { - $output = ''; - } - - if ( 'arrow-right' === $icon ) { - $output = ' - - '; - } - - if ( 'arrow-left' === $icon ) { - $output = ' - - '; - } - - if ( 'arrow-up' === $icon ) { - $output = ' - - '; - } - - if ( $replace ) { - $output .= ''; - } - - $output = apply_filters( 'generate_svg_icon_element', $output, $icon ); - - $classes = array( - 'gp-icon', - 'icon-' . $icon, - ); - - $output = sprintf( - '%2$s', - implode( ' ', $classes ), - $output - ); - - return apply_filters( 'generate_svg_icon', $output, $icon ); -} - -/** - * Out our icon HTML. - * - * @since 2.3 - * - * @param string $icon The icon to print. - * @param bool $replace Whether to include the close icon to be shown using JS. - */ -function generate_do_svg_icon( $icon, $replace = false ) { - echo generate_get_svg_icon( $icon, $replace ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Escaped in function. -} - -/** - * Get our media queries. - * - * @since 2.4 - * - * @param string $name Name of the media query. - * @return string The full media query. - */ -function generate_get_media_query( $name ) { - $desktop = apply_filters( 'generate_desktop_media_query', '(min-width:1025px)' ); - $tablet = apply_filters( 'generate_tablet_media_query', '(min-width: 769px) and (max-width: 1024px)' ); - $mobile = apply_filters( 'generate_mobile_media_query', '(max-width:768px)' ); - $mobile_menu = apply_filters( 'generate_mobile_menu_media_query', $mobile ); - - $queries = apply_filters( - 'generate_media_queries', - array( - 'desktop' => $desktop, - 'tablet' => $tablet, - 'mobile' => $mobile, - 'mobile-menu' => $mobile_menu, - ) - ); - - return $queries[ $name ]; -} - -/** - * Display HTML classes for an element. - * - * @since 2.2 - * - * @param string $context The element we're targeting. - * @param string|array $class One or more classes to add to the class list. - */ -function generate_do_element_classes( $context, $class = '' ) { - $after = apply_filters( 'generate_after_element_class_attribute', '', $context ); - - if ( $after ) { - $after = ' ' . $after; - } - - echo 'class="' . join( ' ', generate_get_element_classes( $context, $class ) ) . '"' . $after; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Escaped in function. -} - -/** - * Retrieve HTML classes for an element. - * - * @since 2.2 - * - * @param string $context The element we're targeting. - * @param string|array $class One or more classes to add to the class list. - * @return array Array of classes. - */ -function generate_get_element_classes( $context, $class = '' ) { - $classes = array(); - - if ( ! empty( $class ) ) { - if ( ! is_array( $class ) ) { - $class = preg_split( '#\s+#', $class ); - } - - $classes = array_merge( $classes, $class ); - } - - $classes = array_map( 'esc_attr', $classes ); - - return apply_filters( "generate_{$context}_class", $classes, $class ); -} - -/** - * Get the kind of schema we're using. - * - * @since 3.0.0 - */ -function generate_get_schema_type() { - return apply_filters( 'generate_schema_type', 'microdata' ); -} - -/** - * Get any necessary microdata. - * - * @since 2.2 - * - * @param string $context The element to target. - * @return string Our final attribute to add to the element. - */ -function generate_get_microdata( $context ) { - $data = false; - - if ( 'microdata' !== generate_get_schema_type() ) { - return false; - } - - if ( 'body' === $context ) { - $type = 'WebPage'; - - if ( is_home() || is_archive() || is_attachment() || is_tax() || is_single() ) { - $type = 'Blog'; - } - - if ( is_search() ) { - $type = 'SearchResultsPage'; - } - - $type = apply_filters( 'generate_body_itemtype', $type ); - - $data = sprintf( - 'itemtype="https://schema.org/%s" itemscope', - esc_html( $type ) - ); - } - - if ( 'header' === $context ) { - $data = 'itemtype="https://schema.org/WPHeader" itemscope'; - } - - if ( 'navigation' === $context ) { - $data = 'itemtype="https://schema.org/SiteNavigationElement" itemscope'; - } - - if ( 'article' === $context ) { - $type = apply_filters( 'generate_article_itemtype', 'CreativeWork' ); - - $data = sprintf( - 'itemtype="https://schema.org/%s" itemscope', - esc_html( $type ) - ); - } - - if ( 'post-author' === $context ) { - $data = 'itemprop="author" itemtype="https://schema.org/Person" itemscope'; - } - - if ( 'comment-body' === $context ) { - $data = 'itemtype="https://schema.org/Comment" itemscope'; - } - - if ( 'comment-author' === $context ) { - $data = 'itemprop="author" itemtype="https://schema.org/Person" itemscope'; - } - - if ( 'sidebar' === $context ) { - $data = 'itemtype="https://schema.org/WPSideBar" itemscope'; - } - - if ( 'footer' === $context ) { - $data = 'itemtype="https://schema.org/WPFooter" itemscope'; - } - - if ( $data ) { - return apply_filters( "generate_{$context}_microdata", $data ); - } -} - -/** - * Output our microdata for an element. - * - * @since 2.2 - * - * @param string $context The element to target. - */ -function generate_do_microdata( $context ) { - echo generate_get_microdata( $context ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Escaped in function. -} - -/** - * Whether to print hAtom output or not. - * - * @since 3.0.0 - */ -function generate_is_using_hatom() { - return apply_filters( 'generate_is_using_hatom', true ); -} - -/** - * Check whether we're using the Flexbox structure. - * - * @since 3.0.0 - */ -function generate_is_using_flexbox() { - // No flexbox for old versions of GPP. - if ( defined( 'GP_PREMIUM_VERSION' ) && version_compare( GP_PREMIUM_VERSION, '1.11.0-alpha.1', '<' ) ) { - return false; - } - - return 'flexbox' === generate_get_option( 'structure' ); -} - -/** - * Check if we have any menu bar items. - * - * @since 3.0.0 - */ -function generate_has_menu_bar_items() { - return has_action( 'generate_menu_bar_items' ); -} - -/** - * Check if we should include the default template part. - * - * @since 3.0.0 - * @param string $template The template to get. - */ -function generate_do_template_part( $template ) { - /** - * generate_before_do_template_part hook. - * - * @since 3.0.0 - * @param string $template The template. - */ - do_action( 'generate_before_do_template_part', $template ); - - if ( apply_filters( 'generate_do_template_part', true, $template ) ) { - if ( 'archive' === $template || 'index' === $template ) { - get_template_part( 'content', get_post_format() ); - } - - if ( 'page' === $template ) { - get_template_part( 'content', 'page' ); - } - - if ( 'single' === $template ) { - get_template_part( 'content', 'single' ); - } - - if ( 'search' === $template ) { - get_template_part( 'content', 'search' ); - } - - if ( '404' === $template ) { - get_template_part( 'content', '404' ); - } - - if ( 'none' === $template ) { - get_template_part( 'no-results' ); - } - } - - /** - * generate_after_do_template_parts hook. - * - * @since 3.0.0 - * @param string $template The template. - */ - do_action( 'generate_after_do_template_part', $template ); -} - -/** - * Check if we should use inline mobile navigation. - * - * @since 3.0.0 - */ -function generate_has_inline_mobile_toggle() { - $has_inline_mobile_toggle = generate_is_using_flexbox() && ( 'nav-float-right' === generate_get_navigation_location() || 'nav-float-left' === generate_get_navigation_location() ); - - return apply_filters( 'generate_has_inline_mobile_toggle', $has_inline_mobile_toggle ); -} - -/** - * Build our the_title() parameters. - * - * @since 3.0.0 - */ -function generate_get_the_title_parameters() { - $params = array( - 'before' => sprintf( - '

    ', - 'microdata' === generate_get_schema_type() ? ' itemprop="headline"' : '' - ), - 'after' => '

    ', - ); - - if ( ! is_singular() ) { - $params = array( - 'before' => sprintf( - '

    ', - esc_url( get_permalink() ), - 'microdata' === generate_get_schema_type() ? ' itemprop="headline"' : '' - ), - 'after' => '

    ', - ); - } - - if ( 'link' === get_post_format() ) { - $params = array( - 'before' => sprintf( - '

    ', - esc_url( generate_get_link_url() ), - 'microdata' === generate_get_schema_type() ? ' itemprop="headline"' : '' - ), - 'after' => '

    ', - ); - } - - return apply_filters( 'generate_get_the_title_parameters', $params ); -} - -/** - * Check whether we should display the default loop or not. - * - * @since 3.0.0 - */ -function generate_has_default_loop() { - return apply_filters( 'generate_has_default_loop', true ); -} - -/** - * Detemine whether to output site branding container. - * - * @since 3.0.0 - */ -function generate_needs_site_branding_container() { - $container = false; - - if ( generate_has_logo_site_branding() ) { - if ( generate_is_using_flexbox() || generate_get_option( 'inline_logo_site_branding' ) ) { - $container = true; - } - } - - return $container; -} +post_content, '' ) ); + + $format = ( false !== get_post_format() ) ? get_post_format() : 'standard'; + + $show_excerpt = ( 'excerpt' === generate_get_option( 'post_content' ) ) ? true : false; + + $show_excerpt = ( 'standard' !== $format ) ? false : $show_excerpt; + + $show_excerpt = ( $more_tag ) ? false : $show_excerpt; + + $show_excerpt = ( is_search() ) ? true : $show_excerpt; + + return apply_filters( 'generate_show_excerpt', $show_excerpt ); + } +} + +if ( ! function_exists( 'generate_show_title' ) ) { + /** + * Check to see if we should show our page/post title or not. + * + * @since 1.3.18 + * + * @return bool Whether to show the content title. + */ + function generate_show_title() { + return apply_filters( 'generate_show_title', true ); + } +} + +/** + * Check whether we should display the entry header or not. + * + * @since 3.0.0 + */ +function generate_show_entry_header() { + $show_entry_header = true; + $show_title = generate_show_title(); + $has_before_entry_title = has_action( 'generate_before_entry_title' ); + $has_after_entry_title = has_action( 'generate_after_entry_title' ); + + if ( is_page() ) { + $has_before_entry_title = has_action( 'generate_before_page_title' ); + $has_after_entry_title = has_action( 'generate_after_page_title' ); + } + + if ( ! $show_title && ! $has_before_entry_title && ! $has_after_entry_title ) { + $show_entry_header = false; + } + + return apply_filters( 'generate_show_entry_header', $show_entry_header ); +} + +if ( ! function_exists( 'generate_get_premium_url' ) ) { + /** + * Generate a URL to our premium add-ons. + * Allows the use of a referral ID and campaign. + * + * @since 1.3.42 + * + * @param string $url URL to premium page. + * @param bool $trailing_slash Whether we want to include a trailing slash. + * @return string The URL to generatepress.com. + */ + function generate_get_premium_url( $url = 'https://generatepress.com/premium', $trailing_slash = true ) { + if ( $trailing_slash ) { + $url = trailingslashit( $url ); + } + + $args = apply_filters( + 'generate_premium_url_args', + array( + 'ref' => null, + 'campaign' => null, + ) + ); + + if ( isset( $args['ref'] ) ) { + $url = add_query_arg( 'ref', absint( $args['ref'] ), $url ); + } + + if ( isset( $args['campaign'] ) ) { + $url = add_query_arg( 'campaign', sanitize_text_field( $args['campaign'] ), $url ); + } + + return esc_url( $url ); + } +} + +if ( ! function_exists( 'generate_padding_css' ) ) { + /** + * Shorten our padding/margin values into shorthand form. + * + * @since 0.1 + * + * @param int $top Top spacing. + * @param int $right Right spacing. + * @param int $bottom Bottom spacing. + * @param int $left Left spacing. + * @return string Element spacing values. + */ + function generate_padding_css( $top, $right, $bottom, $left ) { + $padding_top = ( isset( $top ) && '' !== $top ) ? absint( $top ) . 'px ' : '0px '; + $padding_right = ( isset( $right ) && '' !== $right ) ? absint( $right ) . 'px ' : '0px '; + $padding_bottom = ( isset( $bottom ) && '' !== $bottom ) ? absint( $bottom ) . 'px ' : '0px '; + $padding_left = ( isset( $left ) && '' !== $left ) ? absint( $left ) . 'px' : '0px'; + + if ( ( absint( $padding_top ) === absint( $padding_right ) ) && ( absint( $padding_right ) === absint( $padding_bottom ) ) && ( absint( $padding_bottom ) === absint( $padding_left ) ) ) { + return $padding_left; + } + + return $padding_top . $padding_right . $padding_bottom . $padding_left; + } +} + +if ( ! function_exists( 'generate_get_link_url' ) ) { + /** + * Return the post URL. + * + * Falls back to the post permalink if no URL is found in the post. + * + * @since 1.2.5 + * + * @see get_url_in_content() + * @return string The Link format URL. + */ + function generate_get_link_url() { + $has_url = get_url_in_content( get_the_content() ); + + // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound -- Core filter name. + return $has_url ? $has_url : apply_filters( 'the_permalink', get_permalink() ); + } +} + +if ( ! function_exists( 'generate_get_navigation_location' ) ) { + /** + * Get the location of the navigation and filter it. + * + * @since 1.3.41 + * + * @return string The primary menu location. + */ + function generate_get_navigation_location() { + return apply_filters( 'generate_navigation_location', generate_get_option( 'nav_position_setting' ) ); + } +} + +/** + * Check if the logo and site branding are active. + * + * @since 2.3 + */ +function generate_has_logo_site_branding() { + $has_site_title = ! generate_get_option( 'hide_title' ) && get_bloginfo( 'title' ); + $has_site_tagline = ! generate_get_option( 'hide_tagline' ) && get_bloginfo( 'description' ); + + if ( get_theme_mod( 'custom_logo' ) && ( $has_site_title || $has_site_tagline ) ) { + return true; + } + + return false; +} + +/** + * Create SVG icons. + * + * @since 2.3 + * + * @param string $icon The icon to get. + * @param bool $replace Whether we're replacing an icon on action (click). + */ +function generate_get_svg_icon( $icon, $replace = false ) { + if ( 'svg' !== generate_get_option( 'icons' ) ) { + return; + } + + $output = ''; + + if ( 'menu-bars' === $icon ) { + $output = ''; + } + + if ( 'close' === $icon ) { + $output = ''; + } + + if ( 'search' === $icon ) { + $output = ''; + } + + if ( 'categories' === $icon ) { + $output = ''; + } + + if ( 'tags' === $icon ) { + $output = ''; + } + + if ( 'comments' === $icon ) { + $output = ''; + } + + if ( 'arrow' === $icon ) { + $output = ''; + } + + if ( 'arrow-right' === $icon ) { + $output = ' + + '; + } + + if ( 'arrow-left' === $icon ) { + $output = ' + + '; + } + + if ( 'arrow-up' === $icon ) { + $output = ' + + '; + } + + if ( $replace ) { + $output .= ''; + } + + $output = apply_filters( 'generate_svg_icon_element', $output, $icon ); + + $classes = array( + 'gp-icon', + 'icon-' . $icon, + ); + + $output = sprintf( + '%2$s', + implode( ' ', $classes ), + $output + ); + + return apply_filters( 'generate_svg_icon', $output, $icon ); +} + +/** + * Out our icon HTML. + * + * @since 2.3 + * + * @param string $icon The icon to print. + * @param bool $replace Whether to include the close icon to be shown using JS. + */ +function generate_do_svg_icon( $icon, $replace = false ) { + echo generate_get_svg_icon( $icon, $replace ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Escaped in function. +} + +/** + * Get our media queries. + * + * @since 2.4 + * + * @param string $name Name of the media query. + * @return string The full media query. + */ +function generate_get_media_query( $name ) { + $desktop = apply_filters( 'generate_desktop_media_query', '(min-width:1025px)' ); + $tablet = apply_filters( 'generate_tablet_media_query', '(min-width: 769px) and (max-width: 1024px)' ); + $mobile = apply_filters( 'generate_mobile_media_query', '(max-width:768px)' ); + $mobile_menu = apply_filters( 'generate_mobile_menu_media_query', $mobile ); + + $queries = apply_filters( + 'generate_media_queries', + array( + 'desktop' => $desktop, + 'tablet' => $tablet, + 'mobile' => $mobile, + 'mobile-menu' => $mobile_menu, + ) + ); + + return $queries[ $name ]; +} + +/** + * Display HTML classes for an element. + * + * @since 2.2 + * + * @param string $context The element we're targeting. + * @param string|array $class One or more classes to add to the class list. + */ +function generate_do_element_classes( $context, $class = '' ) { + $after = apply_filters( 'generate_after_element_class_attribute', '', $context ); + + if ( $after ) { + $after = ' ' . $after; + } + + echo 'class="' . join( ' ', generate_get_element_classes( $context, $class ) ) . '"' . $after; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Escaped in function. +} + +/** + * Retrieve HTML classes for an element. + * + * @since 2.2 + * + * @param string $context The element we're targeting. + * @param string|array $class One or more classes to add to the class list. + * @return array Array of classes. + */ +function generate_get_element_classes( $context, $class = '' ) { + $classes = array(); + + if ( ! empty( $class ) ) { + if ( ! is_array( $class ) ) { + $class = preg_split( '#\s+#', $class ); + } + + $classes = array_merge( $classes, $class ); + } + + $classes = array_map( 'esc_attr', $classes ); + + return apply_filters( "generate_{$context}_class", $classes, $class ); +} + +/** + * Get the kind of schema we're using. + * + * @since 3.0.0 + */ +function generate_get_schema_type() { + return apply_filters( 'generate_schema_type', 'microdata' ); +} + +/** + * Get any necessary microdata. + * + * @since 2.2 + * + * @param string $context The element to target. + * @return string Our final attribute to add to the element. + */ +function generate_get_microdata( $context ) { + $data = false; + + if ( 'microdata' !== generate_get_schema_type() ) { + return false; + } + + if ( 'body' === $context ) { + $type = 'WebPage'; + + if ( is_home() || is_archive() || is_attachment() || is_tax() || is_single() ) { + $type = 'Blog'; + } + + if ( is_search() ) { + $type = 'SearchResultsPage'; + } + + $type = apply_filters( 'generate_body_itemtype', $type ); + + $data = sprintf( + 'itemtype="https://schema.org/%s" itemscope', + esc_html( $type ) + ); + } + + if ( 'header' === $context ) { + $data = 'itemtype="https://schema.org/WPHeader" itemscope'; + } + + if ( 'navigation' === $context ) { + $data = 'itemtype="https://schema.org/SiteNavigationElement" itemscope'; + } + + if ( 'article' === $context ) { + $type = apply_filters( 'generate_article_itemtype', 'CreativeWork' ); + + $data = sprintf( + 'itemtype="https://schema.org/%s" itemscope', + esc_html( $type ) + ); + } + + if ( 'post-author' === $context ) { + $data = 'itemprop="author" itemtype="https://schema.org/Person" itemscope'; + } + + if ( 'comment-body' === $context ) { + $data = 'itemtype="https://schema.org/Comment" itemscope'; + } + + if ( 'comment-author' === $context ) { + $data = 'itemprop="author" itemtype="https://schema.org/Person" itemscope'; + } + + if ( 'sidebar' === $context ) { + $data = 'itemtype="https://schema.org/WPSideBar" itemscope'; + } + + if ( 'footer' === $context ) { + $data = 'itemtype="https://schema.org/WPFooter" itemscope'; + } + + if ( $data ) { + return apply_filters( "generate_{$context}_microdata", $data ); + } +} + +/** + * Output our microdata for an element. + * + * @since 2.2 + * + * @param string $context The element to target. + */ +function generate_do_microdata( $context ) { + echo generate_get_microdata( $context ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Escaped in function. +} + +/** + * Whether to print hAtom output or not. + * + * @since 3.0.0 + */ +function generate_is_using_hatom() { + return apply_filters( 'generate_is_using_hatom', true ); +} + +/** + * Check whether we're using the Flexbox structure. + * + * @since 3.0.0 + */ +function generate_is_using_flexbox() { + // No flexbox for old versions of GPP. + if ( defined( 'GP_PREMIUM_VERSION' ) && version_compare( GP_PREMIUM_VERSION, '1.11.0-alpha.1', '<' ) ) { + return false; + } + + return 'flexbox' === generate_get_option( 'structure' ); +} + +/** + * Check if we have any menu bar items. + * + * @since 3.0.0 + */ +function generate_has_menu_bar_items() { + return has_action( 'generate_menu_bar_items' ); +} + +/** + * Check if we should include the default template part. + * + * @since 3.0.0 + * @param string $template The template to get. + */ +function generate_do_template_part( $template ) { + /** + * generate_before_do_template_part hook. + * + * @since 3.0.0 + * @param string $template The template. + */ + do_action( 'generate_before_do_template_part', $template ); + + if ( apply_filters( 'generate_do_template_part', true, $template ) ) { + if ( 'archive' === $template || 'index' === $template ) { + get_template_part( 'content', get_post_format() ); + } + + if ( 'page' === $template ) { + get_template_part( 'content', 'page' ); + } + + if ( 'single' === $template ) { + get_template_part( 'content', 'single' ); + } + + if ( 'search' === $template ) { + get_template_part( 'content', 'search' ); + } + + if ( '404' === $template ) { + get_template_part( 'content', '404' ); + } + + if ( 'none' === $template ) { + get_template_part( 'no-results' ); + } + } + + /** + * generate_after_do_template_parts hook. + * + * @since 3.0.0 + * @param string $template The template. + */ + do_action( 'generate_after_do_template_part', $template ); +} + +/** + * Check if we should use inline mobile navigation. + * + * @since 3.0.0 + */ +function generate_has_inline_mobile_toggle() { + $has_inline_mobile_toggle = generate_is_using_flexbox() && ( 'nav-float-right' === generate_get_navigation_location() || 'nav-float-left' === generate_get_navigation_location() ); + + return apply_filters( 'generate_has_inline_mobile_toggle', $has_inline_mobile_toggle ); +} + +/** + * Build our the_title() parameters. + * + * @since 3.0.0 + */ +function generate_get_the_title_parameters() { + $params = array( + 'before' => sprintf( + '

    ', + 'microdata' === generate_get_schema_type() ? ' itemprop="headline"' : '' + ), + 'after' => '

    ', + ); + + if ( ! is_singular() ) { + $params = array( + 'before' => sprintf( + '

    ', + esc_url( get_permalink() ), + 'microdata' === generate_get_schema_type() ? ' itemprop="headline"' : '' + ), + 'after' => '

    ', + ); + } + + if ( 'link' === get_post_format() ) { + $params = array( + 'before' => sprintf( + '

    ', + esc_url( generate_get_link_url() ), + 'microdata' === generate_get_schema_type() ? ' itemprop="headline"' : '' + ), + 'after' => '

    ', + ); + } + + return apply_filters( 'generate_get_the_title_parameters', $params ); +} + +/** + * Check whether we should display the default loop or not. + * + * @since 3.0.0 + */ +function generate_has_default_loop() { + return apply_filters( 'generate_has_default_loop', true ); +} + +/** + * Detemine whether to output site branding container. + * + * @since 3.0.0 + */ +function generate_needs_site_branding_container() { + $container = false; + + if ( generate_has_logo_site_branding() ) { + if ( generate_is_using_flexbox() || generate_get_option( 'inline_logo_site_branding' ) ) { + $container = true; + } + } + + return $container; +} diff --git a/wp-content/themes/generatepress/inc/typography.php b/wp-content/themes/generatepress/inc/typography.php index 3f93c6cb..121f29e6 100644 --- a/wp-content/themes/generatepress/inc/typography.php +++ b/wp-content/themes/generatepress/inc/typography.php @@ -1,1121 +1,1121 @@ -register_control_type( 'Generate_Typography_Customize_Control' ); - $wp_customize->register_control_type( 'Generate_Range_Slider_Control' ); - } - - $wp_customize->add_section( - 'font_section', - array( - 'title' => __( 'Typography', 'generatepress' ), - 'capability' => 'edit_theme_options', - 'priority' => 30, - ) - ); - - $wp_customize->add_setting( - 'generate_settings[font_body]', - array( - 'default' => $defaults['font_body'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_text_field', - ) - ); - - $wp_customize->add_setting( - 'font_body_category', - array( - 'default' => $defaults['font_body_category'], - 'sanitize_callback' => 'sanitize_text_field', - ) - ); - - $wp_customize->add_setting( - 'font_body_variants', - array( - 'default' => $defaults['font_body_variants'], - 'sanitize_callback' => 'generate_sanitize_variants', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[body_font_weight]', - array( - 'default' => $defaults['body_font_weight'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[body_font_transform]', - array( - 'default' => $defaults['body_font_transform'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - 'transport' => 'postMessage', - - ) - ); - - $wp_customize->add_control( - new Generate_Typography_Customize_Control( - $wp_customize, - 'body_typography', - array( - 'label' => __( 'Body', 'generatepress' ), - 'section' => 'font_section', - 'priority' => 1, - 'settings' => array( - 'family' => 'generate_settings[font_body]', - 'variant' => 'font_body_variants', - 'category' => 'font_body_category', - 'weight' => 'generate_settings[body_font_weight]', - 'transform' => 'generate_settings[body_font_transform]', - ), - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[body_font_size]', - array( - 'default' => $defaults['body_font_size'], - 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_integer', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new Generate_Range_Slider_Control( - $wp_customize, - 'generate_settings[body_font_size]', - array( - 'type' => 'generatepress-range-slider', - 'description' => __( 'Font size', 'generatepress' ), - 'section' => 'font_section', - 'settings' => array( - 'desktop' => 'generate_settings[body_font_size]', - ), - 'choices' => array( - 'desktop' => array( - 'min' => 6, - 'max' => 25, - 'step' => 1, - 'edit' => true, - 'unit' => 'px', - ), - ), - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[body_line_height]', - array( - 'default' => $defaults['body_line_height'], - 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_decimal_integer', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new Generate_Range_Slider_Control( - $wp_customize, - 'generate_settings[body_line_height]', - array( - 'type' => 'generatepress-range-slider', - 'description' => __( 'Line height', 'generatepress' ), - 'section' => 'font_section', - 'settings' => array( - 'desktop' => 'generate_settings[body_line_height]', - ), - 'choices' => array( - 'desktop' => array( - 'min' => 1, - 'max' => 3, - 'step' => .1, - 'edit' => true, - 'unit' => '', - ), - ), - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[paragraph_margin]', - array( - 'default' => $defaults['paragraph_margin'], - 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_decimal_integer', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new Generate_Range_Slider_Control( - $wp_customize, - 'generate_settings[paragraph_margin]', - array( - 'type' => 'generatepress-range-slider', - 'description' => __( 'Paragraph margin', 'generatepress' ), - 'section' => 'font_section', - 'settings' => array( - 'desktop' => 'generate_settings[paragraph_margin]', - ), - 'choices' => array( - 'desktop' => array( - 'min' => 0, - 'max' => 5, - 'step' => .1, - 'edit' => true, - 'unit' => 'em', - ), - ), - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[font_heading_1]', - array( - 'default' => $defaults['font_heading_1'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_text_field', - ) - ); - - $wp_customize->add_setting( - 'font_heading_1_category', - array( - 'default' => '', - 'sanitize_callback' => 'sanitize_text_field', - ) - ); - - $wp_customize->add_setting( - 'font_heading_1_variants', - array( - 'default' => '', - 'sanitize_callback' => 'generate_sanitize_variants', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[heading_1_weight]', - array( - 'default' => $defaults['heading_1_weight'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[heading_1_transform]', - array( - 'default' => $defaults['heading_1_transform'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new Generate_Typography_Customize_Control( - $wp_customize, - 'font_heading_1_control', - array( - 'label' => __( 'Heading 1 (H1)', 'generatepress' ), - 'section' => 'font_section', - 'settings' => array( - 'family' => 'generate_settings[font_heading_1]', - 'variant' => 'font_heading_1_variants', - 'category' => 'font_heading_1_category', - 'weight' => 'generate_settings[heading_1_weight]', - 'transform' => 'generate_settings[heading_1_transform]', - ), - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[heading_1_font_size]', - array( - 'default' => $defaults['heading_1_font_size'], - 'type' => 'option', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[mobile_heading_1_font_size]', - array( - 'default' => $defaults['mobile_heading_1_font_size'], - 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_empty_absint', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new Generate_Range_Slider_Control( - $wp_customize, - 'h1_font_sizes', - array( - 'description' => __( 'Font size', 'generatepress' ), - 'section' => 'font_section', - 'settings' => array( - 'desktop' => 'generate_settings[heading_1_font_size]', - 'mobile' => 'generate_settings[mobile_heading_1_font_size]', - ), - 'choices' => array( - 'desktop' => array( - 'min' => 15, - 'max' => 100, - 'step' => 1, - 'edit' => true, - 'unit' => 'px', - ), - 'mobile' => array( - 'min' => 15, - 'max' => 100, - 'step' => 1, - 'edit' => true, - 'unit' => 'px', - ), - ), - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[heading_1_line_height]', - array( - 'default' => $defaults['heading_1_line_height'], - 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_decimal_integer', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new Generate_Range_Slider_Control( - $wp_customize, - 'generate_settings[heading_1_line_height]', - array( - 'description' => __( 'Line height', 'generatepress' ), - 'section' => 'font_section', - 'settings' => array( - 'desktop' => 'generate_settings[heading_1_line_height]', - ), - 'choices' => array( - 'desktop' => array( - 'min' => 0, - 'max' => 5, - 'step' => .1, - 'edit' => true, - 'unit' => 'em', - ), - ), - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[font_heading_2]', - array( - 'default' => $defaults['font_heading_2'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_text_field', - ) - ); - - $wp_customize->add_setting( - 'font_heading_2_category', - array( - 'default' => '', - 'sanitize_callback' => 'sanitize_text_field', - ) - ); - - $wp_customize->add_setting( - 'font_heading_2_variants', - array( - 'default' => '', - 'sanitize_callback' => 'generate_sanitize_variants', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[heading_2_weight]', - array( - 'default' => $defaults['heading_2_weight'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[heading_2_transform]', - array( - 'default' => $defaults['heading_2_transform'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new Generate_Typography_Customize_Control( - $wp_customize, - 'font_heading_2_control', - array( - 'label' => __( 'Heading 2 (H2)', 'generatepress' ), - 'section' => 'font_section', - 'settings' => array( - 'family' => 'generate_settings[font_heading_2]', - 'variant' => 'font_heading_2_variants', - 'category' => 'font_heading_2_category', - 'weight' => 'generate_settings[heading_2_weight]', - 'transform' => 'generate_settings[heading_2_transform]', - ), - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[heading_2_font_size]', - array( - 'default' => $defaults['heading_2_font_size'], - 'type' => 'option', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[mobile_heading_2_font_size]', - array( - 'default' => $defaults['mobile_heading_2_font_size'], - 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_empty_absint', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new Generate_Range_Slider_Control( - $wp_customize, - 'h2_font_sizes', - array( - 'description' => __( 'Font size', 'generatepress' ), - 'section' => 'font_section', - 'settings' => array( - 'desktop' => 'generate_settings[heading_2_font_size]', - 'mobile' => 'generate_settings[mobile_heading_2_font_size]', - ), - 'choices' => array( - 'desktop' => array( - 'min' => 10, - 'max' => 80, - 'step' => 1, - 'edit' => true, - 'unit' => 'px', - ), - 'mobile' => array( - 'min' => 10, - 'max' => 80, - 'step' => 1, - 'edit' => true, - 'unit' => 'px', - ), - ), - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[heading_2_line_height]', - array( - 'default' => $defaults['heading_2_line_height'], - 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_decimal_integer', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new Generate_Range_Slider_Control( - $wp_customize, - 'generate_settings[heading_2_line_height]', - array( - 'description' => __( 'Line height', 'generatepress' ), - 'section' => 'font_section', - 'settings' => array( - 'desktop' => 'generate_settings[heading_2_line_height]', - ), - 'choices' => array( - 'desktop' => array( - 'min' => 0, - 'max' => 5, - 'step' => .1, - 'edit' => true, - 'unit' => 'em', - ), - ), - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[font_heading_3]', - array( - 'default' => $defaults['font_heading_3'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_text_field', - ) - ); - - $wp_customize->add_setting( - 'font_heading_3_category', - array( - 'default' => '', - 'sanitize_callback' => 'sanitize_text_field', - ) - ); - - $wp_customize->add_setting( - 'font_heading_3_variants', - array( - 'default' => '', - 'sanitize_callback' => 'generate_sanitize_variants', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[heading_3_weight]', - array( - 'default' => $defaults['heading_3_weight'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_setting( - 'generate_settings[heading_3_transform]', - array( - 'default' => $defaults['heading_3_transform'], - 'type' => 'option', - 'sanitize_callback' => 'sanitize_key', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new Generate_Typography_Customize_Control( - $wp_customize, - 'font_heading_3_control', - array( - 'label' => __( 'Heading 3 (H3)', 'generatepress' ), - 'section' => 'font_section', - 'settings' => array( - 'family' => 'generate_settings[font_heading_3]', - 'variant' => 'font_heading_3_variants', - 'category' => 'font_heading_3_category', - 'weight' => 'generate_settings[heading_3_weight]', - 'transform' => 'generate_settings[heading_3_transform]', - ), - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[heading_3_font_size]', - array( - 'default' => $defaults['heading_3_font_size'], - 'type' => 'option', - 'sanitize_callback' => 'absint', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new Generate_Range_Slider_Control( - $wp_customize, - 'h3_font_sizes', - array( - 'description' => __( 'Font size', 'generatepress' ), - 'section' => 'font_section', - 'settings' => array( - 'desktop' => 'generate_settings[heading_3_font_size]', - ), - 'choices' => array( - 'desktop' => array( - 'min' => 10, - 'max' => 80, - 'step' => 1, - 'edit' => true, - 'unit' => 'px', - ), - ), - ) - ) - ); - - $wp_customize->add_setting( - 'generate_settings[heading_3_line_height]', - array( - 'default' => $defaults['heading_3_line_height'], - 'type' => 'option', - 'sanitize_callback' => 'generate_sanitize_decimal_integer', - 'transport' => 'postMessage', - ) - ); - - $wp_customize->add_control( - new Generate_Range_Slider_Control( - $wp_customize, - 'generate_settings[heading_3_line_height]', - array( - 'description' => __( 'Line height', 'generatepress' ), - 'section' => 'font_section', - 'settings' => array( - 'desktop' => 'generate_settings[heading_3_line_height]', - ), - 'choices' => array( - 'desktop' => array( - 'min' => 0, - 'max' => 5, - 'step' => .1, - 'edit' => true, - 'unit' => 'em', - ), - ), - ) - ) - ); - - if ( ! function_exists( 'generate_fonts_customize_register' ) && ! defined( 'GP_PREMIUM_VERSION' ) ) { - $wp_customize->add_control( - new Generate_Customize_Misc_Control( - $wp_customize, - 'typography_get_addon_desc', - array( - 'section' => 'font_section', - 'type' => 'addon', - 'label' => __( 'Learn more', 'generatepress' ), - 'description' => __( 'More options are available for this section in our premium version.', 'generatepress' ), - 'url' => generate_get_premium_url( 'https://generatepress.com/premium/#typography', false ), - 'priority' => 50, - 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', - ) - ) - ); - } - } -} - -if ( ! function_exists( 'generate_get_all_google_fonts' ) ) { - /** - * Return an array of all of our Google Fonts. - * - * @since 1.3.0 - * @param string $amount How many fonts to return. - * @return array The list of Google Fonts. - */ - function generate_get_all_google_fonts( $amount = 'all' ) { - // Our big list Google Fonts. - // We use json_decode to reduce PHP memory usage. - // Adding them as a PHP array seems to use quite a bit more memory. - $content = json_decode( '[{"family":"Roboto","category":"sans-serif","variants":["100","100italic","300","300italic","regular","italic","500","500italic","700","700italic","900","900italic"]},{"family":"Open Sans","category":"sans-serif","variants":["300","300italic","regular","italic","600","600italic","700","700italic","800","800italic"]},{"family":"Lato","category":"sans-serif","variants":["100","100italic","300","300italic","regular","italic","700","700italic","900","900italic"]},{"family":"Slabo 27px","category":"serif","variants":["regular"]},{"family":"Oswald","category":"sans-serif","variants":["200","300","regular","500","600","700"]},{"family":"Roboto Condensed","category":"sans-serif","variants":["300","300italic","regular","italic","700","700italic"]},{"family":"Source Sans Pro","category":"sans-serif","variants":["200","200italic","300","300italic","regular","italic","600","600italic","700","700italic","900","900italic"]},{"family":"Montserrat","category":"sans-serif","variants":["100","100italic","200","200italic","300","300italic","regular","italic","500","500italic","600","600italic","700","700italic","800","800italic","900","900italic"]},{"family":"Raleway","category":"sans-serif","variants":["100","100italic","200","200italic","300","300italic","regular","italic","500","500italic","600","600italic","700","700italic","800","800italic","900","900italic"]},{"family":"PT Sans","category":"sans-serif","variants":["regular","italic","700","700italic"]},{"family":"Roboto Slab","category":"serif","variants":["100","300","regular","700"]},{"family":"Merriweather","category":"serif","variants":["300","300italic","regular","italic","700","700italic","900","900italic"]},{"family":"Open Sans Condensed","category":"sans-serif","variants":["300","300italic","700"]},{"family":"Droid Sans","category":"sans-serif","variants":["regular","700"]},{"family":"Lora","category":"serif","variants":["regular","italic","700","700italic"]},{"family":"Ubuntu","category":"sans-serif","variants":["300","300italic","regular","italic","500","500italic","700","700italic"]},{"family":"Droid Serif","category":"serif","variants":["regular","italic","700","700italic"]},{"family":"Playfair Display","category":"serif","variants":["regular","italic","700","700italic","900","900italic"]},{"family":"Arimo","category":"sans-serif","variants":["regular","italic","700","700italic"]},{"family":"Noto Sans","category":"sans-serif","variants":["regular","italic","700","700italic"]},{"family":"PT Serif","category":"serif","variants":["regular","italic","700","700italic"]},{"family":"Titillium Web","category":"sans-serif","variants":["200","200italic","300","300italic","regular","italic","600","600italic","700","700italic","900"]},{"family":"PT Sans Narrow","category":"sans-serif","variants":["regular","700"]},{"family":"Muli","category":"sans-serif","variants":["200","200italic","300","300italic","regular","italic","600","600italic","700","700italic","800","800italic","900","900italic"]},{"family":"Indie Flower","category":"handwriting","variants":["regular"]},{"family":"Bitter","category":"serif","variants":["regular","italic","700"]},{"family":"Poppins","category":"sans-serif","variants":["300","regular","500","600","700"]},{"family":"Inconsolata","category":"monospace","variants":["regular","700"]},{"family":"Dosis","category":"sans-serif","variants":["200","300","regular","500","600","700","800"]},{"family":"Fjalla One","category":"sans-serif","variants":["regular"]},{"family":"Oxygen","category":"sans-serif","variants":["300","regular","700"]},{"family":"Hind","category":"sans-serif","variants":["300","regular","500","600","700"]},{"family":"Cabin","category":"sans-serif","variants":["regular","italic","500","500italic","600","600italic","700","700italic"]},{"family":"Anton","category":"sans-serif","variants":["regular"]},{"family":"Arvo","category":"serif","variants":["regular","italic","700","700italic"]},{"family":"Noto Serif","category":"serif","variants":["regular","italic","700","700italic"]},{"family":"Crimson Text","category":"serif","variants":["regular","italic","600","600italic","700","700italic"]},{"family":"Lobster","category":"display","variants":["regular"]},{"family":"Yanone Kaffeesatz","category":"sans-serif","variants":["200","300","regular","700"]},{"family":"Nunito","category":"sans-serif","variants":["200","200italic","300","300italic","regular","italic","600","600italic","700","700italic","800","800italic","900","900italic"]},{"family":"Bree Serif","category":"serif","variants":["regular"]},{"family":"Catamaran","category":"sans-serif","variants":["100","200","300","regular","500","600","700","800","900"]},{"family":"Libre Baskerville","category":"serif","variants":["regular","italic","700"]},{"family":"Abel","category":"sans-serif","variants":["regular"]},{"family":"Josefin Sans","category":"sans-serif","variants":["100","100italic","300","300italic","regular","italic","600","600italic","700","700italic"]},{"family":"Fira Sans","category":"sans-serif","variants":["100","100italic","200","200italic","300","300italic","regular","italic","500","500italic","600","600italic","700","700italic","800","800italic","900","900italic"]},{"family":"Gloria Hallelujah","category":"handwriting","variants":["regular"]},{"family":"Abril Fatface","category":"display","variants":["regular"]},{"family":"Exo 2","category":"sans-serif","variants":["100","100italic","200","200italic","300","300italic","regular","italic","500","500italic","600","600italic","700","700italic","800","800italic","900","900italic"]},{"family":"Merriweather Sans","category":"sans-serif","variants":["300","300italic","regular","italic","700","700italic","800","800italic"]},{"family":"Pacifico","category":"handwriting","variants":["regular"]},{"family":"Roboto Mono","category":"monospace","variants":["100","100italic","300","300italic","regular","italic","500","500italic","700","700italic"]},{"family":"Varela Round","category":"sans-serif","variants":["regular"]},{"family":"Asap","category":"sans-serif","variants":["regular","italic","500","500italic","700","700italic"]},{"family":"Amatic SC","category":"handwriting","variants":["regular","700"]},{"family":"Quicksand","category":"sans-serif","variants":["300","regular","500","700"]},{"family":"Karla","category":"sans-serif","variants":["regular","italic","700","700italic"]},{"family":"Ubuntu Condensed","category":"sans-serif","variants":["regular"]},{"family":"Signika","category":"sans-serif","variants":["300","regular","600","700"]},{"family":"Alegreya","category":"serif","variants":["regular","italic","700","700italic","900","900italic"]},{"family":"Questrial","category":"sans-serif","variants":["regular"]},{"family":"Rubik","category":"sans-serif","variants":["300","300italic","regular","italic","500","500italic","700","700italic","900","900italic"]},{"family":"Shadows Into Light","category":"handwriting","variants":["regular"]},{"family":"PT Sans Caption","category":"sans-serif","variants":["regular","700"]},{"family":"Archivo Narrow","category":"sans-serif","variants":["regular","italic","700","700italic"]},{"family":"Play","category":"sans-serif","variants":["regular","700"]},{"family":"Cuprum","category":"sans-serif","variants":["regular","italic","700","700italic"]},{"family":"Dancing Script","category":"handwriting","variants":["regular","700"]},{"family":"Rokkitt","category":"serif","variants":["100","200","300","regular","500","600","700","800","900"]},{"family":"Work Sans","category":"sans-serif","variants":["100","200","300","regular","500","600","700","800","900"]},{"family":"Francois One","category":"sans-serif","variants":["regular"]},{"family":"Vollkorn","category":"serif","variants":["regular","italic","700","700italic"]},{"family":"Source Code Pro","category":"monospace","variants":["200","300","regular","500","600","700","900"]},{"family":"Exo","category":"sans-serif","variants":["100","100italic","200","200italic","300","300italic","regular","italic","500","500italic","600","600italic","700","700italic","800","800italic","900","900italic"]},{"family":"Maven Pro","category":"sans-serif","variants":["regular","500","700","900"]},{"family":"Architects Daughter","category":"handwriting","variants":["regular"]},{"family":"Orbitron","category":"sans-serif","variants":["regular","500","700","900"]},{"family":"Pathway Gothic One","category":"sans-serif","variants":["regular"]},{"family":"Acme","category":"sans-serif","variants":["regular"]},{"family":"Ropa Sans","category":"sans-serif","variants":["regular","italic"]},{"family":"Patua One","category":"display","variants":["regular"]},{"family":"EB Garamond","category":"serif","variants":["regular"]},{"family":"Lobster Two","category":"display","variants":["regular","italic","700","700italic"]},{"family":"Crete Round","category":"serif","variants":["regular","italic"]},{"family":"Cinzel","category":"serif","variants":["regular","700","900"]},{"family":"Josefin Slab","category":"serif","variants":["100","100italic","300","300italic","regular","italic","600","600italic","700","700italic"]},{"family":"Source Serif Pro","category":"serif","variants":["regular","600","700"]},{"family":"Alegreya Sans","category":"sans-serif","variants":["100","100italic","300","300italic","regular","italic","500","500italic","700","700italic","800","800italic","900","900italic"]},{"family":"Comfortaa","category":"display","variants":["300","regular","700"]},{"family":"Russo One","category":"sans-serif","variants":["regular"]},{"family":"News Cycle","category":"sans-serif","variants":["regular","700"]},{"family":"ABeeZee","category":"sans-serif","variants":["regular","italic"]},{"family":"Yellowtail","category":"handwriting","variants":["regular"]},{"family":"Noticia Text","category":"serif","variants":["regular","italic","700","700italic"]},{"family":"Monda","category":"sans-serif","variants":["regular","700"]},{"family":"Quattrocento Sans","category":"sans-serif","variants":["regular","italic","700","700italic"]},{"family":"Hammersmith One","category":"sans-serif","variants":["regular"]},{"family":"Libre Franklin","category":"sans-serif","variants":["100","100italic","200","200italic","300","300italic","regular","italic","500","500italic","600","600italic","700","700italic","800","800italic","900","900italic"]},{"family":"Satisfy","category":"handwriting","variants":["regular"]},{"family":"Pontano Sans","category":"sans-serif","variants":["regular"]},{"family":"Righteous","category":"display","variants":["regular"]},{"family":"Poiret One","category":"display","variants":["regular"]},{"family":"BenchNine","category":"sans-serif","variants":["300","regular","700"]},{"family":"Arapey","category":"serif","variants":["regular","italic"]},{"family":"Kaushan Script","category":"handwriting","variants":["regular"]},{"family":"Economica","category":"sans-serif","variants":["regular","italic","700","700italic"]},{"family":"Kanit","category":"sans-serif","variants":["100","100italic","200","200italic","300","300italic","regular","italic","500","500italic","600","600italic","700","700italic","800","800italic","900","900italic"]},{"family":"Old Standard TT","category":"serif","variants":["regular","italic","700"]},{"family":"Sanchez","category":"serif","variants":["regular","italic"]},{"family":"Courgette","category":"handwriting","variants":["regular"]},{"family":"Quattrocento","category":"serif","variants":["regular","700"]},{"family":"Domine","category":"serif","variants":["regular","700"]},{"family":"Gudea","category":"sans-serif","variants":["regular","italic","700"]},{"family":"Permanent Marker","category":"handwriting","variants":["regular"]},{"family":"Armata","category":"sans-serif","variants":["regular"]},{"family":"Cantarell","category":"sans-serif","variants":["regular","italic","700","700italic"]},{"family":"Archivo Black","category":"sans-serif","variants":["regular"]},{"family":"Istok Web","category":"sans-serif","variants":["regular","italic","700","700italic"]},{"family":"Cardo","category":"serif","variants":["regular","italic","700"]},{"family":"Playfair Display SC","category":"serif","variants":["regular","italic","700","700italic","900","900italic"]},{"family":"Passion One","category":"display","variants":["regular","700","900"]},{"family":"Tinos","category":"serif","variants":["regular","italic","700","700italic"]},{"family":"Cookie","category":"handwriting","variants":["regular"]},{"family":"Cormorant Garamond","category":"serif","variants":["300","300italic","regular","italic","500","500italic","600","600italic","700","700italic"]},{"family":"Philosopher","category":"sans-serif","variants":["regular","italic","700","700italic"]},{"family":"Yantramanav","category":"sans-serif","variants":["100","300","regular","500","700","900"]},{"family":"Chewy","category":"display","variants":["regular"]},{"family":"Antic Slab","category":"serif","variants":["regular"]},{"family":"Handlee","category":"handwriting","variants":["regular"]},{"family":"Teko","category":"sans-serif","variants":["300","regular","500","600","700"]},{"family":"Boogaloo","category":"display","variants":["regular"]},{"family":"Vidaloka","category":"serif","variants":["regular"]},{"family":"Audiowide","category":"display","variants":["regular"]},{"family":"Coming Soon","category":"handwriting","variants":["regular"]},{"family":"Alfa Slab One","category":"display","variants":["regular"]},{"family":"Cabin Condensed","category":"sans-serif","variants":["regular","500","600","700"]},{"family":"Ruda","category":"sans-serif","variants":["regular","700","900"]},{"family":"Ek Mukta","category":"sans-serif","variants":["200","300","regular","500","600","700","800"]},{"family":"Changa One","category":"display","variants":["regular","italic"]},{"family":"Tangerine","category":"handwriting","variants":["regular","700"]},{"family":"Great Vibes","category":"handwriting","variants":["regular"]},{"family":"Sintony","category":"sans-serif","variants":["regular","700"]},{"family":"Khand","category":"sans-serif","variants":["300","regular","500","600","700"]},{"family":"Bevan","category":"display","variants":["regular"]},{"family":"Kalam","category":"handwriting","variants":["300","regular","700"]},{"family":"Days One","category":"sans-serif","variants":["regular"]},{"family":"Bangers","category":"display","variants":["regular"]},{"family":"Rajdhani","category":"sans-serif","variants":["300","regular","500","600","700"]},{"family":"Droid Sans Mono","category":"monospace","variants":["regular"]},{"family":"Kreon","category":"serif","variants":["300","regular","700"]},{"family":"Rambla","category":"sans-serif","variants":["regular","italic","700","700italic"]},{"family":"Shrikhand","category":"display","variants":["regular"]},{"family":"Fredoka One","category":"display","variants":["regular"]},{"family":"Shadows Into Light Two","category":"handwriting","variants":["regular"]},{"family":"Playball","category":"display","variants":["regular"]},{"family":"Neuton","category":"serif","variants":["200","300","regular","italic","700","800"]},{"family":"Copse","category":"serif","variants":["regular"]},{"family":"Didact Gothic","category":"sans-serif","variants":["regular"]},{"family":"Signika Negative","category":"sans-serif","variants":["300","regular","600","700"]},{"family":"Amiri","category":"serif","variants":["regular","italic","700","700italic"]},{"family":"Gentium Book Basic","category":"serif","variants":["regular","italic","700","700italic"]},{"family":"Glegoo","category":"serif","variants":["regular","700"]},{"family":"Oleo Script","category":"display","variants":["regular","700"]},{"family":"Voltaire","category":"sans-serif","variants":["regular"]},{"family":"Actor","category":"sans-serif","variants":["regular"]},{"family":"Amaranth","category":"sans-serif","variants":["regular","italic","700","700italic"]},{"family":"Paytone One","category":"sans-serif","variants":["regular"]},{"family":"Volkhov","category":"serif","variants":["regular","italic","700","700italic"]},{"family":"Sorts Mill Goudy","category":"serif","variants":["regular","italic"]},{"family":"Bad Script","category":"handwriting","variants":["regular"]},{"family":"Coda","category":"display","variants":["regular","800"]},{"family":"Damion","category":"handwriting","variants":["regular"]},{"family":"Sacramento","category":"handwriting","variants":["regular"]},{"family":"Squada One","category":"display","variants":["regular"]},{"family":"Rock Salt","category":"handwriting","variants":["regular"]},{"family":"Adamina","category":"serif","variants":["regular"]},{"family":"Alice","category":"serif","variants":["regular"]},{"family":"Cantata One","category":"serif","variants":["regular"]},{"family":"Luckiest Guy","category":"display","variants":["regular"]},{"family":"Rochester","category":"handwriting","variants":["regular"]},{"family":"Covered By Your Grace","category":"handwriting","variants":["regular"]},{"family":"Heebo","category":"sans-serif","variants":["100","300","regular","500","700","800","900"]},{"family":"VT323","category":"monospace","variants":["regular"]},{"family":"Nothing You Could Do","category":"handwriting","variants":["regular"]},{"family":"Patrick Hand","category":"handwriting","variants":["regular"]},{"family":"Gentium Basic","category":"serif","variants":["regular","italic","700","700italic"]},{"family":"Nobile","category":"sans-serif","variants":["regular","italic","700","700italic"]},{"family":"Rancho","category":"handwriting","variants":["regular"]},{"family":"Marck Script","category":"handwriting","variants":["regular"]},{"family":"Special Elite","category":"display","variants":["regular"]},{"family":"Julius Sans One","category":"sans-serif","variants":["regular"]},{"family":"Varela","category":"sans-serif","variants":["regular"]},{"family":"PT Mono","category":"monospace","variants":["regular"]},{"family":"Alex Brush","category":"handwriting","variants":["regular"]},{"family":"Homemade Apple","category":"handwriting","variants":["regular"]},{"family":"Scada","category":"sans-serif","variants":["regular","italic","700","700italic"]},{"family":"Jura","category":"sans-serif","variants":["300","regular","500","600"]},{"family":"Antic","category":"sans-serif","variants":["regular"]},{"family":"Gochi Hand","category":"handwriting","variants":["regular"]},{"family":"Sarala","category":"sans-serif","variants":["regular","700"]},{"family":"Electrolize","category":"sans-serif","variants":["regular"]},{"family":"Sigmar One","category":"display","variants":["regular"]},{"family":"Candal","category":"sans-serif","variants":["regular"]},{"family":"Prata","category":"serif","variants":["regular"]},{"family":"Homenaje","category":"sans-serif","variants":["regular"]},{"family":"Pinyon Script","category":"handwriting","variants":["regular"]},{"family":"Unica One","category":"display","variants":["regular"]},{"family":"Basic","category":"sans-serif","variants":["regular"]},{"family":"Neucha","category":"handwriting","variants":["regular"]},{"family":"Convergence","category":"sans-serif","variants":["regular"]},{"family":"Molengo","category":"sans-serif","variants":["regular"]},{"family":"Caveat Brush","category":"handwriting","variants":["regular"]},{"family":"Monoton","category":"display","variants":["regular"]},{"family":"Calligraffitti","category":"handwriting","variants":["regular"]},{"family":"Kameron","category":"serif","variants":["regular","700"]},{"family":"Share","category":"display","variants":["regular","italic","700","700italic"]},{"family":"Alegreya Sans SC","category":"sans-serif","variants":["100","100italic","300","300italic","regular","italic","500","500italic","700","700italic","800","800italic","900","900italic"]},{"family":"Enriqueta","category":"serif","variants":["regular","700"]},{"family":"Martel","category":"serif","variants":["200","300","regular","600","700","800","900"]},{"family":"Black Ops One","category":"display","variants":["regular"]},{"family":"Just Another Hand","category":"handwriting","variants":["regular"]},{"family":"Caveat","category":"handwriting","variants":["regular","700"]},{"family":"PT Serif Caption","category":"serif","variants":["regular","italic"]},{"family":"Ultra","category":"serif","variants":["regular"]},{"family":"Ubuntu Mono","category":"monospace","variants":["regular","italic","700","700italic"]},{"family":"Carme","category":"sans-serif","variants":["regular"]},{"family":"Cousine","category":"monospace","variants":["regular","italic","700","700italic"]},{"family":"Cherry Cream Soda","category":"display","variants":["regular"]},{"family":"Reenie Beanie","category":"handwriting","variants":["regular"]},{"family":"Hind Siliguri","category":"sans-serif","variants":["300","regular","500","600","700"]},{"family":"Bubblegum Sans","category":"display","variants":["regular"]},{"family":"Aldrich","category":"sans-serif","variants":["regular"]},{"family":"Lustria","category":"serif","variants":["regular"]},{"family":"Alef","category":"sans-serif","variants":["regular","700"]},{"family":"Freckle Face","category":"display","variants":["regular"]},{"family":"Fanwood Text","category":"serif","variants":["regular","italic"]},{"family":"Advent Pro","category":"sans-serif","variants":["100","200","300","regular","500","600","700"]},{"family":"Allura","category":"handwriting","variants":["regular"]},{"family":"Ceviche One","category":"display","variants":["regular"]},{"family":"Press Start 2P","category":"display","variants":["regular"]},{"family":"Overlock","category":"display","variants":["regular","italic","700","700italic","900","900italic"]},{"family":"Niconne","category":"handwriting","variants":["regular"]},{"family":"Limelight","category":"display","variants":["regular"]},{"family":"Frank Ruhl Libre","category":"sans-serif","variants":["300","regular","500","700","900"]},{"family":"Allerta Stencil","category":"sans-serif","variants":["regular"]},{"family":"Marcellus","category":"serif","variants":["regular"]},{"family":"Pragati Narrow","category":"sans-serif","variants":["regular","700"]},{"family":"Michroma","category":"sans-serif","variants":["regular"]},{"family":"Fauna One","category":"serif","variants":["regular"]},{"family":"Syncopate","category":"sans-serif","variants":["regular","700"]},{"family":"Telex","category":"sans-serif","variants":["regular"]},{"family":"Marvel","category":"sans-serif","variants":["regular","italic","700","700italic"]},{"family":"Cabin Sketch","category":"display","variants":["regular","700"]},{"family":"Hanuman","category":"serif","variants":["regular","700"]},{"family":"Cairo","category":"sans-serif","variants":["200","300","regular","600","700","900"]},{"family":"Chivo","category":"sans-serif","variants":["300","300italic","regular","italic","700","700italic","900","900italic"]},{"family":"Allerta","category":"sans-serif","variants":["regular"]},{"family":"Fugaz One","category":"display","variants":["regular"]},{"family":"Viga","category":"sans-serif","variants":["regular"]},{"family":"Ruslan Display","category":"display","variants":["regular"]},{"family":"Nixie One","category":"display","variants":["regular"]},{"family":"Marmelad","category":"sans-serif","variants":["regular"]},{"family":"Average","category":"serif","variants":["regular"]},{"family":"Spinnaker","category":"sans-serif","variants":["regular"]},{"family":"Leckerli One","category":"handwriting","variants":["regular"]},{"family":"Judson","category":"serif","variants":["regular","italic","700"]},{"family":"Lusitana","category":"serif","variants":["regular","700"]},{"family":"Montserrat Alternates","category":"sans-serif","variants":["100","100italic","200","200italic","300","300italic","regular","italic","500","500italic","600","600italic","700","700italic","800","800italic","900","900italic"]},{"family":"Contrail One","category":"display","variants":["regular"]},{"family":"Oranienbaum","category":"serif","variants":["regular"]},{"family":"Hind Vadodara","category":"sans-serif","variants":["300","regular","500","600","700"]},{"family":"Rufina","category":"serif","variants":["regular","700"]},{"family":"Quantico","category":"sans-serif","variants":["regular","italic","700","700italic"]},{"family":"Concert One","category":"display","variants":["regular"]},{"family":"Marcellus SC","category":"serif","variants":["regular"]},{"family":"Jockey One","category":"sans-serif","variants":["regular"]},{"family":"Parisienne","category":"handwriting","variants":["regular"]},{"family":"Carter One","category":"display","variants":["regular"]},{"family":"Arbutus Slab","category":"serif","variants":["regular"]},{"family":"Slabo 13px","category":"serif","variants":["regular"]},{"family":"Tauri","category":"sans-serif","variants":["regular"]},{"family":"Goudy Bookletter 1911","category":"serif","variants":["regular"]},{"family":"Carrois Gothic","category":"sans-serif","variants":["regular"]},{"family":"Sue Ellen Francisco","category":"handwriting","variants":["regular"]},{"family":"Walter Turncoat","category":"handwriting","variants":["regular"]},{"family":"Annie Use Your Telescope","category":"handwriting","variants":["regular"]},{"family":"Puritan","category":"sans-serif","variants":["regular","italic","700","700italic"]},{"family":"Grand Hotel","category":"handwriting","variants":["regular"]},{"family":"Yesteryear","category":"handwriting","variants":["regular"]},{"family":"Jaldi","category":"sans-serif","variants":["regular","700"]},{"family":"Khula","category":"sans-serif","variants":["300","regular","600","700","800"]},{"family":"Cinzel Decorative","category":"display","variants":["regular","700","900"]},{"family":"Crafty Girls","category":"handwriting","variants":["regular"]},{"family":"Merienda","category":"handwriting","variants":["regular","700"]},{"family":"Hind Guntur","category":"sans-serif","variants":["300","regular","500","600","700"]},{"family":"Cutive","category":"serif","variants":["regular"]},{"family":"Prompt","category":"sans-serif","variants":["100","100italic","200","200italic","300","300italic","regular","italic","500","500italic","600","600italic","700","700italic","800","800italic","900","900italic"]},{"family":"Coustard","category":"serif","variants":["regular","900"]},{"family":"Arima Madurai","category":"display","variants":["100","200","300","regular","500","700","800","900"]},{"family":"Doppio One","category":"sans-serif","variants":["regular"]},{"family":"Radley","category":"serif","variants":["regular","italic"]},{"family":"Fontdiner Swanky","category":"display","variants":["regular"]},{"family":"Iceland","category":"display","variants":["regular"]},{"family":"Alegreya SC","category":"serif","variants":["regular","italic","700","700italic","900","900italic"]},{"family":"Halant","category":"serif","variants":["300","regular","500","600","700"]},{"family":"Schoolbell","category":"handwriting","variants":["regular"]},{"family":"Waiting for the Sunrise","category":"handwriting","variants":["regular"]},{"family":"Italianno","category":"handwriting","variants":["regular"]},{"family":"Fredericka the Great","category":"display","variants":["regular"]},{"family":"Average Sans","category":"sans-serif","variants":["regular"]},{"family":"Rosario","category":"sans-serif","variants":["regular","italic","700","700italic"]},{"family":"Mr Dafoe","category":"handwriting","variants":["regular"]},{"family":"Port Lligat Slab","category":"serif","variants":["regular"]},{"family":"Aclonica","category":"sans-serif","variants":["regular"]},{"family":"Graduate","category":"display","variants":["regular"]},{"family":"Racing Sans One","category":"display","variants":["regular"]},{"family":"Berkshire Swash","category":"handwriting","variants":["regular"]},{"family":"Forum","category":"display","variants":["regular"]},{"family":"Anonymous Pro","category":"monospace","variants":["regular","italic","700","700italic"]},{"family":"Love Ya Like A Sister","category":"display","variants":["regular"]},{"family":"Nunito Sans","category":"sans-serif","variants":["200","200italic","300","300italic","regular","italic","600","600italic","700","700italic","800","800italic","900","900italic"]},{"family":"Magra","category":"sans-serif","variants":["regular","700"]},{"family":"Lateef","category":"handwriting","variants":["regular"]},{"family":"Assistant","category":"sans-serif","variants":["200","300","regular","600","700","800"]},{"family":"Six Caps","category":"sans-serif","variants":["regular"]},{"family":"Gilda Display","category":"serif","variants":["regular"]},{"family":"Oregano","category":"display","variants":["regular","italic"]},{"family":"Metrophobic","category":"sans-serif","variants":["regular"]},{"family":"Lalezar","category":"display","variants":["regular"]},{"family":"Caudex","category":"serif","variants":["regular","italic","700","700italic"]},{"family":"Kelly Slab","category":"display","variants":["regular"]},{"family":"Reem Kufi","category":"sans-serif","variants":["regular"]},{"family":"Cambay","category":"sans-serif","variants":["regular","italic","700","700italic"]},{"family":"Gruppo","category":"display","variants":["regular"]},{"family":"Give You Glory","category":"handwriting","variants":["regular"]},{"family":"GFS Didot","category":"serif","variants":["regular"]},{"family":"Duru Sans","category":"sans-serif","variants":["regular"]},{"family":"Andika","category":"sans-serif","variants":["regular"]},{"family":"Tenor Sans","category":"sans-serif","variants":["regular"]},{"family":"Knewave","category":"display","variants":["regular"]},{"family":"Averia Serif Libre","category":"display","variants":["300","300italic","regular","italic","700","700italic"]},{"family":"Eczar","category":"serif","variants":["regular","500","600","700","800"]},{"family":"Inder","category":"sans-serif","variants":["regular"]},{"family":"Martel Sans","category":"sans-serif","variants":["200","300","regular","600","700","800","900"]},{"family":"Trocchi","category":"serif","variants":["regular"]},{"family":"Wire One","category":"sans-serif","variants":["regular"]},{"family":"Petit Formal Script","category":"handwriting","variants":["regular"]},{"family":"Mako","category":"sans-serif","variants":["regular"]},{"family":"Frijole","category":"display","variants":["regular"]},{"family":"Zeyada","category":"handwriting","variants":["regular"]},{"family":"Slackey","category":"display","variants":["regular"]},{"family":"Karma","category":"serif","variants":["300","regular","500","600","700"]},{"family":"Mate","category":"serif","variants":["regular","italic"]},{"family":"Belleza","category":"sans-serif","variants":["regular"]},{"family":"Montez","category":"handwriting","variants":["regular"]},{"family":"Quando","category":"serif","variants":["regular"]},{"family":"Capriola","category":"sans-serif","variants":["regular"]},{"family":"Lilita One","category":"display","variants":["regular"]},{"family":"Trirong","category":"serif","variants":["100","100italic","200","200italic","300","300italic","regular","italic","500","500italic","600","600italic","700","700italic","800","800italic","900","900italic"]},{"family":"Lekton","category":"sans-serif","variants":["regular","italic","700"]},{"family":"Just Me Again Down Here","category":"handwriting","variants":["regular"]},{"family":"Bowlby One SC","category":"display","variants":["regular"]},{"family":"The Girl Next Door","category":"handwriting","variants":["regular"]},{"family":"Happy Monkey","category":"display","variants":["regular"]},{"family":"Merienda One","category":"handwriting","variants":["regular"]},{"family":"Alike","category":"serif","variants":["regular"]},{"family":"Chelsea Market","category":"display","variants":["regular"]},{"family":"Unkempt","category":"display","variants":["regular","700"]},{"family":"Anaheim","category":"sans-serif","variants":["regular"]},{"family":"Strait","category":"sans-serif","variants":["regular"]},{"family":"Brawler","category":"serif","variants":["regular"]},{"family":"Clicker Script","category":"handwriting","variants":["regular"]},{"family":"Delius","category":"handwriting","variants":["regular"]},{"family":"Mouse Memoirs","category":"sans-serif","variants":["regular"]},{"family":"IM Fell Double Pica","category":"serif","variants":["regular","italic"]},{"family":"Crushed","category":"display","variants":["regular"]},{"family":"Rammetto One","category":"display","variants":["regular"]},{"family":"Prosto One","category":"display","variants":["regular"]},{"family":"Kranky","category":"display","variants":["regular"]},{"family":"IM Fell English","category":"serif","variants":["regular","italic"]},{"family":"Aladin","category":"handwriting","variants":["regular"]},{"family":"Mr De Haviland","category":"handwriting","variants":["regular"]},{"family":"NTR","category":"sans-serif","variants":["regular"]},{"family":"Londrina Solid","category":"display","variants":["regular"]},{"family":"Skranji","category":"display","variants":["regular","700"]},{"family":"Allan","category":"display","variants":["regular","700"]},{"family":"Baumans","category":"display","variants":["regular"]},{"family":"Ovo","category":"serif","variants":["regular"]},{"family":"Changa","category":"sans-serif","variants":["200","300","regular","500","600","700","800"]},{"family":"Lemon","category":"display","variants":["regular"]},{"family":"Federo","category":"sans-serif","variants":["regular"]},{"family":"Herr Von Muellerhoff","category":"handwriting","variants":["regular"]},{"family":"Arizonia","category":"handwriting","variants":["regular"]},{"family":"Bowlby One","category":"display","variants":["regular"]},{"family":"Orienta","category":"sans-serif","variants":["regular"]},{"family":"Short Stack","category":"handwriting","variants":["regular"]},{"family":"Bungee Inline","category":"display","variants":["regular"]},{"family":"Andada","category":"serif","variants":["regular"]},{"family":"Baloo Paaji","category":"display","variants":["regular"]},{"family":"Oxygen Mono","category":"monospace","variants":["regular"]},{"family":"Yeseva One","category":"display","variants":["regular"]},{"family":"UnifrakturMaguntia","category":"display","variants":["regular"]},{"family":"Bentham","category":"serif","variants":["regular"]},{"family":"Londrina Outline","category":"display","variants":["regular"]},{"family":"Pompiere","category":"display","variants":["regular"]},{"family":"Gabriela","category":"serif","variants":["regular"]},{"family":"Qwigley","category":"handwriting","variants":["regular"]},{"family":"Nova Square","category":"display","variants":["regular"]},{"family":"Poly","category":"serif","variants":["regular","italic"]},{"family":"Sniglet","category":"display","variants":["regular","800"]},{"family":"Patrick Hand SC","category":"handwriting","variants":["regular"]},{"family":"Gravitas One","category":"display","variants":["regular"]},{"family":"Khmer","category":"display","variants":["regular"]},{"family":"Shojumaru","category":"display","variants":["regular"]},{"family":"Kurale","category":"serif","variants":["regular"]},{"family":"Gafata","category":"sans-serif","variants":["regular"]},{"family":"Biryani","category":"sans-serif","variants":["200","300","regular","600","700","800","900"]},{"family":"Cambo","category":"serif","variants":["regular"]},{"family":"Titan One","category":"display","variants":["regular"]},{"family":"Carrois Gothic SC","category":"sans-serif","variants":["regular"]},{"family":"La Belle Aurore","category":"handwriting","variants":["regular"]},{"family":"Holtwood One SC","category":"serif","variants":["regular"]},{"family":"Oleo Script Swash Caps","category":"display","variants":["regular","700"]},{"family":"Headland One","category":"serif","variants":["regular"]},{"family":"Cherry Swash","category":"display","variants":["regular","700"]},{"family":"Belgrano","category":"serif","variants":["regular"]},{"family":"Norican","category":"handwriting","variants":["regular"]},{"family":"Mountains of Christmas","category":"display","variants":["regular","700"]},{"family":"Julee","category":"handwriting","variants":["regular"]},{"family":"Ramabhadra","category":"sans-serif","variants":["regular"]},{"family":"Mallanna","category":"sans-serif","variants":["regular"]},{"family":"Kristi","category":"handwriting","variants":["regular"]},{"family":"Imprima","category":"sans-serif","variants":["regular"]},{"family":"Lily Script One","category":"display","variants":["regular"]},{"family":"Chau Philomene One","category":"sans-serif","variants":["regular","italic"]},{"family":"Bilbo Swash Caps","category":"handwriting","variants":["regular"]},{"family":"Finger Paint","category":"display","variants":["regular"]},{"family":"Voces","category":"display","variants":["regular"]},{"family":"Itim","category":"handwriting","variants":["regular"]},{"family":"Megrim","category":"display","variants":["regular"]},{"family":"Simonetta","category":"display","variants":["regular","italic","900","900italic"]},{"family":"Cutive Mono","category":"monospace","variants":["regular"]},{"family":"Stardos Stencil","category":"display","variants":["regular","700"]},{"family":"IM Fell DW Pica","category":"serif","variants":["regular","italic"]},{"family":"Unna","category":"serif","variants":["regular","italic","700","700italic"]},{"family":"Loved by the King","category":"handwriting","variants":["regular"]},{"family":"Prociono","category":"serif","variants":["regular"]},{"family":"Corben","category":"display","variants":["regular","700"]},{"family":"Amiko","category":"sans-serif","variants":["regular","600","700"]},{"family":"Denk One","category":"sans-serif","variants":["regular"]},{"family":"Palanquin","category":"sans-serif","variants":["100","200","300","regular","500","600","700"]},{"family":"Baloo","category":"display","variants":["regular"]},{"family":"Fondamento","category":"handwriting","variants":["regular","italic"]},{"family":"Seaweed Script","category":"display","variants":["regular"]},{"family":"Shanti","category":"sans-serif","variants":["regular"]},{"family":"Wendy One","category":"sans-serif","variants":["regular"]},{"family":"Raleway Dots","category":"display","variants":["regular"]},{"family":"Amethysta","category":"serif","variants":["regular"]},{"family":"Vast Shadow","category":"display","variants":["regular"]},{"family":"Stalemate","category":"handwriting","variants":["regular"]},{"family":"Fira Mono","category":"monospace","variants":["regular","500","700"]},{"family":"Expletus Sans","category":"display","variants":["regular","italic","500","500italic","600","600italic","700","700italic"]},{"family":"Scheherazade","category":"serif","variants":["regular","700"]},{"family":"Fenix","category":"serif","variants":["regular"]},{"family":"Delius Swash Caps","category":"handwriting","variants":["regular"]},{"family":"Rouge Script","category":"handwriting","variants":["regular"]},{"family":"Life Savers","category":"display","variants":["regular","700"]},{"family":"IM Fell English SC","category":"serif","variants":["regular"]},{"family":"Meddon","category":"handwriting","variants":["regular"]},{"family":"Tienne","category":"serif","variants":["regular","700","900"]},{"family":"Over the Rainbow","category":"handwriting","variants":["regular"]},{"family":"Share Tech Mono","category":"monospace","variants":["regular"]},{"family":"Abhaya Libre","category":"serif","variants":["regular","500","600","700","800"]},{"family":"Kotta One","category":"serif","variants":["regular"]},{"family":"Pridi","category":"serif","variants":["200","300","regular","500","600","700"]},{"family":"Euphoria Script","category":"handwriting","variants":["regular"]},{"family":"Engagement","category":"handwriting","variants":["regular"]},{"family":"Podkova","category":"serif","variants":["regular","500","600","700","800"]},{"family":"Salsa","category":"display","variants":["regular"]},{"family":"Sofia","category":"handwriting","variants":["regular"]},{"family":"Suranna","category":"serif","variants":["regular"]},{"family":"Mada","category":"sans-serif","variants":["300","regular","500","900"]},{"family":"Chonburi","category":"display","variants":["regular"]},{"family":"Ledger","category":"serif","variants":["regular"]},{"family":"Italiana","category":"serif","variants":["regular"]},{"family":"Dawning of a New Day","category":"handwriting","variants":["regular"]},{"family":"Nokora","category":"serif","variants":["regular","700"]},{"family":"Angkor","category":"display","variants":["regular"]},{"family":"Medula One","category":"display","variants":["regular"]},{"family":"Taviraj","category":"serif","variants":["100","100italic","200","200italic","300","300italic","regular","italic","500","500italic","600","600italic","700","700italic","800","800italic","900","900italic"]},{"family":"Vampiro One","category":"display","variants":["regular"]},{"family":"Englebert","category":"sans-serif","variants":["regular"]},{"family":"Nova Mono","category":"monospace","variants":["regular"]},{"family":"Dorsa","category":"sans-serif","variants":["regular"]},{"family":"Averia Sans Libre","category":"display","variants":["300","300italic","regular","italic","700","700italic"]},{"family":"Cedarville Cursive","category":"handwriting","variants":["regular"]},{"family":"Geo","category":"sans-serif","variants":["regular","italic"]},{"family":"Rationale","category":"sans-serif","variants":["regular"]},{"family":"Balthazar","category":"serif","variants":["regular"]},{"family":"Sunshiney","category":"handwriting","variants":["regular"]},{"family":"Aguafina Script","category":"handwriting","variants":["regular"]},{"family":"Mystery Quest","category":"display","variants":["regular"]},{"family":"Fjord One","category":"serif","variants":["regular"]},{"family":"Fira Sans Extra Condensed","category":"sans-serif","variants":["100","100italic","200","200italic","300","300italic","regular","italic","500","500italic","600","600italic","700","700italic","800","800italic","900","900italic"]},{"family":"Kadwa","category":"serif","variants":["regular","700"]},{"family":"McLaren","category":"display","variants":["regular"]},{"family":"Rye","category":"display","variants":["regular"]},{"family":"Sail","category":"display","variants":["regular"]},{"family":"Athiti","category":"sans-serif","variants":["200","300","regular","500","600","700"]},{"family":"Rosarivo","category":"serif","variants":["regular","italic"]},{"family":"Kite One","category":"sans-serif","variants":["regular"]},{"family":"Odor Mean Chey","category":"display","variants":["regular"]},{"family":"Numans","category":"sans-serif","variants":["regular"]},{"family":"Artifika","category":"serif","variants":["regular"]},{"family":"Poller One","category":"display","variants":["regular"]},{"family":"Gurajada","category":"serif","variants":["regular"]},{"family":"Inika","category":"serif","variants":["regular","700"]},{"family":"Mandali","category":"sans-serif","variants":["regular"]},{"family":"Bungee Shade","category":"display","variants":["regular"]},{"family":"Suwannaphum","category":"display","variants":["regular"]},{"family":"Mate SC","category":"serif","variants":["regular"]},{"family":"Creepster","category":"display","variants":["regular"]},{"family":"Arsenal","category":"sans-serif","variants":["regular","italic","700","700italic"]},{"family":"Montserrat Subrayada","category":"sans-serif","variants":["regular","700"]},{"family":"Metamorphous","category":"display","variants":["regular"]},{"family":"Palanquin Dark","category":"sans-serif","variants":["regular","500","600","700"]},{"family":"Coda Caption","category":"sans-serif","variants":["800"]},{"family":"Dynalight","category":"display","variants":["regular"]},{"family":"Maitree","category":"serif","variants":["200","300","regular","500","600","700"]},{"family":"IM Fell French Canon","category":"serif","variants":["regular","italic"]},{"family":"Amarante","category":"display","variants":["regular"]},{"family":"Quintessential","category":"handwriting","variants":["regular"]},{"family":"Codystar","category":"display","variants":["300","regular"]},{"family":"Cantora One","category":"sans-serif","variants":["regular"]},{"family":"Aref Ruqaa","category":"serif","variants":["regular","700"]},{"family":"Griffy","category":"display","variants":["regular"]},{"family":"Revalia","category":"display","variants":["regular"]},{"family":"Buenard","category":"serif","variants":["regular","700"]},{"family":"Donegal One","category":"serif","variants":["regular"]},{"family":"IM Fell DW Pica SC","category":"serif","variants":["regular"]},{"family":"Habibi","category":"serif","variants":["regular"]},{"family":"Share Tech","category":"sans-serif","variants":["regular"]},{"family":"Flamenco","category":"display","variants":["300","regular"]},{"family":"Mitr","category":"sans-serif","variants":["200","300","regular","500","600","700"]},{"family":"Maiden Orange","category":"display","variants":["regular"]},{"family":"Diplomata SC","category":"display","variants":["regular"]},{"family":"Cormorant","category":"serif","variants":["300","300italic","regular","italic","500","500italic","600","600italic","700","700italic"]},{"family":"Delius Unicase","category":"handwriting","variants":["regular","700"]},{"family":"Stoke","category":"serif","variants":["300","regular"]},{"family":"Vibur","category":"handwriting","variants":["regular"]},{"family":"Sarpanch","category":"sans-serif","variants":["regular","500","600","700","800","900"]},{"family":"Baloo Bhaina","category":"display","variants":["regular"]},{"family":"Baloo Tamma","category":"display","variants":["regular"]},{"family":"Averia Libre","category":"display","variants":["300","300italic","regular","italic","700","700italic"]},{"family":"Esteban","category":"serif","variants":["regular"]},{"family":"Battambang","category":"display","variants":["regular","700"]},{"family":"Bokor","category":"display","variants":["regular"]},{"family":"Wallpoet","category":"display","variants":["regular"]},{"family":"IM Fell Great Primer","category":"serif","variants":["regular","italic"]},{"family":"Tulpen One","category":"display","variants":["regular"]},{"family":"Proza Libre","category":"sans-serif","variants":["regular","italic","500","500italic","600","600italic","700","700italic","800","800italic"]},{"family":"IM Fell French Canon SC","category":"serif","variants":["regular"]},{"family":"Vesper Libre","category":"serif","variants":["regular","500","700","900"]},{"family":"Rozha One","category":"serif","variants":["regular"]},{"family":"Sansita","category":"sans-serif","variants":["regular","italic","700","700italic","800","800italic","900","900italic"]},{"family":"Kavoon","category":"display","variants":["regular"]},{"family":"Della Respira","category":"serif","variants":["regular"]},{"family":"Milonga","category":"display","variants":["regular"]},{"family":"Condiment","category":"handwriting","variants":["regular"]},{"family":"Junge","category":"serif","variants":["regular"]},{"family":"New Rocker","category":"display","variants":["regular"]},{"family":"Chicle","category":"display","variants":["regular"]},{"family":"Mrs Saint Delafield","category":"handwriting","variants":["regular"]},{"family":"League Script","category":"handwriting","variants":["regular"]},{"family":"Miniver","category":"display","variants":["regular"]},{"family":"Galindo","category":"display","variants":["regular"]},{"family":"Moul","category":"display","variants":["regular"]},{"family":"Amatica SC","category":"display","variants":["regular","700"]},{"family":"Stint Ultra Expanded","category":"display","variants":["regular"]},{"family":"Yrsa","category":"serif","variants":["300","regular","500","600","700"]},{"family":"Stint Ultra Condensed","category":"display","variants":["regular"]},{"family":"Suez One","category":"serif","variants":["regular"]},{"family":"Text Me One","category":"sans-serif","variants":["regular"]},{"family":"Buda","category":"display","variants":["300"]},{"family":"Ruluko","category":"sans-serif","variants":["regular"]},{"family":"Sonsie One","category":"display","variants":["regular"]},{"family":"Krona One","category":"sans-serif","variants":["regular"]},{"family":"Elsie","category":"display","variants":["regular","900"]},{"family":"Pangolin","category":"handwriting","variants":["regular"]},{"family":"Linden Hill","category":"serif","variants":["regular","italic"]},{"family":"Secular One","category":"sans-serif","variants":["regular"]},{"family":"IM Fell Double Pica SC","category":"serif","variants":["regular"]},{"family":"Alike Angular","category":"serif","variants":["regular"]},{"family":"Sancreek","category":"display","variants":["regular"]},{"family":"Bilbo","category":"handwriting","variants":["regular"]},{"family":"Antic Didone","category":"serif","variants":["regular"]},{"family":"Paprika","category":"display","variants":["regular"]},{"family":"Asul","category":"sans-serif","variants":["regular","700"]},{"family":"David Libre","category":"serif","variants":["regular","500","700"]},{"family":"Almendra","category":"serif","variants":["regular","italic","700","700italic"]},{"family":"Sriracha","category":"handwriting","variants":["regular"]},{"family":"Miriam Libre","category":"sans-serif","variants":["regular","700"]},{"family":"Ribeye","category":"display","variants":["regular"]},{"family":"Swanky and Moo Moo","category":"handwriting","variants":["regular"]},{"family":"Trade Winds","category":"display","variants":["regular"]},{"family":"Overlock SC","category":"display","variants":["regular"]},{"family":"Nova Round","category":"display","variants":["regular"]},{"family":"Cagliostro","category":"sans-serif","variants":["regular"]},{"family":"Glass Antiqua","category":"display","variants":["regular"]},{"family":"Offside","category":"display","variants":["regular"]},{"family":"El Messiri","category":"sans-serif","variants":["regular","500","600","700"]},{"family":"Bigshot One","category":"display","variants":["regular"]},{"family":"IM Fell Great Primer SC","category":"serif","variants":["regular"]},{"family":"Akronim","category":"display","variants":["regular"]},{"family":"Fira Sans Condensed","category":"sans-serif","variants":["100","100italic","200","200italic","300","300italic","regular","italic","500","500italic","600","600italic","700","700italic","800","800italic","900","900italic"]},{"family":"Nosifer","category":"display","variants":["regular"]},{"family":"Autour One","category":"display","variants":["regular"]},{"family":"Pirata One","category":"display","variants":["regular"]},{"family":"Port Lligat Sans","category":"sans-serif","variants":["regular"]},{"family":"Scope One","category":"serif","variants":["regular"]},{"family":"Sumana","category":"serif","variants":["regular","700"]},{"family":"Lemonada","category":"display","variants":["300","regular","600","700"]},{"family":"Montaga","category":"serif","variants":["regular"]},{"family":"Iceberg","category":"display","variants":["regular"]},{"family":"Ruthie","category":"handwriting","variants":["regular"]},{"family":"Content","category":"display","variants":["regular","700"]},{"family":"Henny Penny","category":"display","variants":["regular"]},{"family":"Nova Slim","category":"display","variants":["regular"]},{"family":"Hind Madurai","category":"sans-serif","variants":["300","regular","500","600","700"]},{"family":"Harmattan","category":"sans-serif","variants":["regular"]},{"family":"UnifrakturCook","category":"display","variants":["700"]},{"family":"Sarina","category":"display","variants":["regular"]},{"family":"Bubbler One","category":"sans-serif","variants":["regular"]},{"family":"Dekko","category":"handwriting","variants":["regular"]},{"family":"Redressed","category":"handwriting","variants":["regular"]},{"family":"Laila","category":"serif","variants":["300","regular","500","600","700"]},{"family":"Faster One","category":"display","variants":["regular"]},{"family":"Arya","category":"sans-serif","variants":["regular","700"]},{"family":"Peralta","category":"display","variants":["regular"]},{"family":"Meie Script","category":"handwriting","variants":["regular"]},{"family":"Overpass","category":"sans-serif","variants":["100","100italic","200","200italic","300","300italic","regular","italic","600","600italic","700","700italic","800","800italic","900","900italic"]},{"family":"Monsieur La Doulaise","category":"handwriting","variants":["regular"]},{"family":"Bungee","category":"display","variants":["regular"]},{"family":"Snippet","category":"sans-serif","variants":["regular"]},{"family":"Emilys Candy","category":"display","variants":["regular"]},{"family":"Trykker","category":"serif","variants":["regular"]},{"family":"MedievalSharp","category":"display","variants":["regular"]},{"family":"Space Mono","category":"monospace","variants":["regular","italic","700","700italic"]},{"family":"Croissant One","category":"display","variants":["regular"]},{"family":"Monofett","category":"display","variants":["regular"]},{"family":"Lovers Quarrel","category":"handwriting","variants":["regular"]},{"family":"Oldenburg","category":"display","variants":["regular"]},{"family":"Galdeano","category":"sans-serif","variants":["regular"]},{"family":"Spicy Rice","category":"display","variants":["regular"]},{"family":"Wellfleet","category":"display","variants":["regular"]},{"family":"Germania One","category":"display","variants":["regular"]},{"family":"GFS Neohellenic","category":"sans-serif","variants":["regular","italic","700","700italic"]},{"family":"Baloo Thambi","category":"display","variants":["regular"]},{"family":"Jolly Lodger","category":"display","variants":["regular"]},{"family":"Rubik Mono One","category":"sans-serif","variants":["regular"]},{"family":"Pattaya","category":"sans-serif","variants":["regular"]},{"family":"Joti One","category":"display","variants":["regular"]},{"family":"Siemreap","category":"display","variants":["regular"]},{"family":"Ranga","category":"display","variants":["regular","700"]},{"family":"Chango","category":"display","variants":["regular"]},{"family":"Miltonian Tattoo","category":"display","variants":["regular"]},{"family":"Koulen","category":"display","variants":["regular"]},{"family":"Eagle Lake","category":"handwriting","variants":["regular"]},{"family":"Nova Flat","category":"display","variants":["regular"]},{"family":"Petrona","category":"serif","variants":["regular"]},{"family":"Jacques Francois","category":"serif","variants":["regular"]},{"family":"Amita","category":"handwriting","variants":["regular","700"]},{"family":"Plaster","category":"display","variants":["regular"]},{"family":"Ramaraja","category":"serif","variants":["regular"]},{"family":"Sura","category":"serif","variants":["regular","700"]},{"family":"Kenia","category":"display","variants":["regular"]},{"family":"Fresca","category":"sans-serif","variants":["regular"]},{"family":"Jomhuria","category":"display","variants":["regular"]},{"family":"Lancelot","category":"display","variants":["regular"]},{"family":"Pavanam","category":"sans-serif","variants":["regular"]},{"family":"Rum Raisin","category":"sans-serif","variants":["regular"]},{"family":"Almendra SC","category":"serif","variants":["regular"]},{"family":"Purple Purse","category":"display","variants":["regular"]},{"family":"Kumar One","category":"display","variants":["regular"]},{"family":"Modern Antiqua","category":"display","variants":["regular"]},{"family":"Piedra","category":"display","variants":["regular"]},{"family":"Irish Grover","category":"display","variants":["regular"]},{"family":"Molle","category":"handwriting","variants":["italic"]},{"family":"Cormorant Infant","category":"serif","variants":["300","300italic","regular","italic","500","500italic","600","600italic","700","700italic"]},{"family":"Margarine","category":"display","variants":["regular"]},{"family":"Sahitya","category":"serif","variants":["regular","700"]},{"family":"Mukta Vaani","category":"sans-serif","variants":["200","300","regular","500","600","700","800"]},{"family":"Astloch","category":"display","variants":["regular","700"]},{"family":"Snowburst One","category":"display","variants":["regular"]},{"family":"Rhodium Libre","category":"serif","variants":["regular"]},{"family":"Smythe","category":"display","variants":["regular"]},{"family":"Asset","category":"display","variants":["regular"]},{"family":"Ewert","category":"display","variants":["regular"]},{"family":"Keania One","category":"display","variants":["regular"]},{"family":"Ranchers","category":"display","variants":["regular"]},{"family":"Gorditas","category":"display","variants":["regular","700"]},{"family":"Sirin Stencil","category":"display","variants":["regular"]},{"family":"Averia Gruesa Libre","category":"display","variants":["regular"]},{"family":"Trochut","category":"display","variants":["regular","italic","700"]},{"family":"Baloo Chettan","category":"display","variants":["regular"]},{"family":"Kdam Thmor","category":"display","variants":["regular"]},{"family":"Timmana","category":"sans-serif","variants":["regular"]},{"family":"Original Surfer","category":"display","variants":["regular"]},{"family":"Supermercado One","category":"display","variants":["regular"]},{"family":"Mirza","category":"display","variants":["regular","500","600","700"]},{"family":"Passero One","category":"display","variants":["regular"]},{"family":"Nova Oval","category":"display","variants":["regular"]},{"family":"Caesar Dressing","category":"display","variants":["regular"]},{"family":"Taprom","category":"display","variants":["regular"]},{"family":"Fascinate","category":"display","variants":["regular"]},{"family":"Seymour One","category":"sans-serif","variants":["regular"]},{"family":"Freehand","category":"display","variants":["regular"]},{"family":"Ravi Prakash","category":"display","variants":["regular"]},{"family":"Coiny","category":"display","variants":["regular"]},{"family":"Atomic Age","category":"display","variants":["regular"]},{"family":"Jacques Francois Shadow","category":"display","variants":["regular"]},{"family":"Diplomata","category":"display","variants":["regular"]},{"family":"Dr Sugiyama","category":"handwriting","variants":["regular"]},{"family":"Miltonian","category":"display","variants":["regular"]},{"family":"Ribeye Marrow","category":"display","variants":["regular"]},{"family":"Elsie Swash Caps","category":"display","variants":["regular","900"]},{"family":"Felipa","category":"handwriting","variants":["regular"]},{"family":"Galada","category":"display","variants":["regular"]},{"family":"Nova Script","category":"display","variants":["regular"]},{"family":"Bayon","category":"display","variants":["regular"]},{"family":"Underdog","category":"display","variants":["regular"]},{"family":"Devonshire","category":"handwriting","variants":["regular"]},{"family":"Atma","category":"display","variants":["300","regular","500","600","700"]},{"family":"Londrina Shadow","category":"display","variants":["regular"]},{"family":"Sofadi One","category":"display","variants":["regular"]},{"family":"Tillana","category":"handwriting","variants":["regular","500","600","700","800"]},{"family":"Inknut Antiqua","category":"serif","variants":["300","regular","500","600","700","800","900"]},{"family":"Goblin One","category":"display","variants":["regular"]},{"family":"Rakkas","category":"display","variants":["regular"]},{"family":"Metal","category":"display","variants":["regular"]},{"family":"Farsan","category":"display","variants":["regular"]},{"family":"Londrina Sketch","category":"display","variants":["regular"]},{"family":"Nova Cut","category":"display","variants":["regular"]},{"family":"BioRhyme","category":"serif","variants":["200","300","regular","700","800"]},{"family":"Warnes","category":"display","variants":["regular"]},{"family":"Romanesco","category":"handwriting","variants":["regular"]},{"family":"Fascinate Inline","category":"display","variants":["regular"]},{"family":"Mrs Sheppards","category":"handwriting","variants":["regular"]},{"family":"Princess Sofia","category":"handwriting","variants":["regular"]},{"family":"Modak","category":"display","variants":["regular"]},{"family":"Spirax","category":"display","variants":["regular"]},{"family":"Cormorant Upright","category":"serif","variants":["300","regular","500","600","700"]},{"family":"Geostar Fill","category":"display","variants":["regular"]},{"family":"Cormorant SC","category":"serif","variants":["300","regular","500","600","700"]},{"family":"Baloo Bhai","category":"display","variants":["regular"]},{"family":"Sree Krushnadevaraya","category":"serif","variants":["regular"]},{"family":"Smokum","category":"display","variants":["regular"]},{"family":"Arbutus","category":"display","variants":["regular"]},{"family":"Fruktur","category":"display","variants":["regular"]},{"family":"Geostar","category":"display","variants":["regular"]},{"family":"Marko One","category":"serif","variants":["regular"]},{"family":"Erica One","category":"display","variants":["regular"]},{"family":"Yatra One","category":"display","variants":["regular"]},{"family":"Uncial Antiqua","category":"display","variants":["regular"]},{"family":"Combo","category":"display","variants":["regular"]},{"family":"Gidugu","category":"sans-serif","variants":["regular"]},{"family":"Aubrey","category":"display","variants":["regular"]},{"family":"Jim Nightshade","category":"handwriting","variants":["regular"]},{"family":"Butterfly Kids","category":"handwriting","variants":["regular"]},{"family":"Metal Mania","category":"display","variants":["regular"]},{"family":"Macondo","category":"display","variants":["regular"]},{"family":"Chenla","category":"display","variants":["regular"]},{"family":"Miss Fajardose","category":"handwriting","variants":["regular"]},{"family":"Macondo Swash Caps","category":"display","variants":["regular"]},{"family":"Barrio","category":"display","variants":["regular"]},{"family":"Sevillana","category":"display","variants":["regular"]},{"family":"Bigelow Rules","category":"display","variants":["regular"]},{"family":"Rasa","category":"serif","variants":["300","regular","500","600","700"]},{"family":"Risque","category":"display","variants":["regular"]},{"family":"Federant","category":"display","variants":["regular"]},{"family":"Dangrek","category":"display","variants":["regular"]},{"family":"Chathura","category":"sans-serif","variants":["100","300","regular","700","800"]},{"family":"Almendra Display","category":"display","variants":["regular"]},{"family":"Chela One","category":"display","variants":["regular"]},{"family":"Bonbon","category":"handwriting","variants":["regular"]},{"family":"Stalinist One","category":"display","variants":["regular"]},{"family":"Mr Bedfort","category":"handwriting","variants":["regular"]},{"family":"Eater","category":"display","variants":["regular"]},{"family":"Fasthand","category":"serif","variants":["regular"]},{"family":"Mogra","category":"display","variants":["regular"]},{"family":"Padauk","category":"sans-serif","variants":["regular","700"]},{"family":"Preahvihear","category":"display","variants":["regular"]},{"family":"Flavors","category":"display","variants":["regular"]},{"family":"Ruge Boogie","category":"handwriting","variants":["regular"]},{"family":"Tenali Ramakrishna","category":"sans-serif","variants":["regular"]},{"family":"Unlock","category":"display","variants":["regular"]},{"family":"Butcherman","category":"display","variants":["regular"]},{"family":"Baloo Da","category":"display","variants":["regular"]},{"family":"Lakki Reddy","category":"handwriting","variants":["regular"]},{"family":"Cormorant Unicase","category":"serif","variants":["300","regular","500","600","700"]},{"family":"Katibeh","category":"display","variants":["regular"]},{"family":"Asar","category":"serif","variants":["regular"]},{"family":"Emblema One","category":"display","variants":["regular"]},{"family":"Moulpali","category":"display","variants":["regular"]},{"family":"Meera Inimai","category":"sans-serif","variants":["regular"]},{"family":"Kantumruy","category":"sans-serif","variants":["300","regular","700"]},{"family":"Suravaram","category":"serif","variants":["regular"]},{"family":"Bungee Hairline","category":"display","variants":["regular"]},{"family":"Overpass Mono","category":"monospace","variants":["300","regular","600","700"]},{"family":"Peddana","category":"serif","variants":["regular"]},{"family":"Bahiana","category":"display","variants":["regular"]},{"family":"Kumar One Outline","category":"display","variants":["regular"]},{"family":"Hanalei Fill","category":"display","variants":["regular"]},{"family":"Dhurjati","category":"sans-serif","variants":["regular"]},{"family":"Hanalei","category":"display","variants":["regular"]},{"family":"Kavivanar","category":"handwriting","variants":["regular"]},{"family":"Bungee Outline","category":"display","variants":["regular"]},{"family":"BioRhyme Expanded","category":"serif","variants":["200","300","regular","700","800"]}]' ); - - // Loop through them and put what we need into our fonts array. - $fonts = array(); - foreach ( $content as $item ) { - - // Grab what we need from our big list. - $atts = array( - 'name' => $item->family, - 'category' => $item->category, - 'variants' => $item->variants, - ); - - // Create an ID using our font family name. - $id = strtolower( str_replace( ' ', '_', $item->family ) ); - - // Add our attributes to our new array. - $fonts[ $id ] = $atts; - } - - if ( 'all' !== $amount ) { - $fonts = array_slice( $fonts, 0, $amount ); - } - - if ( apply_filters( 'generate_alphabetize_google_fonts', true ) ) { - asort( $fonts ); - } - - return apply_filters( 'generate_google_fonts_array', $fonts ); - } -} - -if ( ! function_exists( 'generate_get_all_google_fonts_ajax' ) ) { - add_action( 'wp_ajax_generate_get_all_google_fonts_ajax', 'generate_get_all_google_fonts_ajax' ); - /** - * Return an array of all of our Google Fonts. - * - * @since 1.3.0 - */ - function generate_get_all_google_fonts_ajax() { - if ( ! isset( $_POST['gp_customize_nonce'] ) || ! wp_verify_nonce( sanitize_key( $_POST['gp_customize_nonce'] ), 'gp_customize_nonce' ) ) { - wp_die(); - } - - check_ajax_referer( 'gp_customize_nonce', 'gp_customize_nonce' ); - - if ( ! current_user_can( 'edit_theme_options' ) ) { - wp_die(); - } - - $fonts = generate_get_all_google_fonts(); - - echo wp_json_encode( $fonts ); - - die(); - } -} - -if ( ! function_exists( 'generate_get_google_font_variants' ) ) { - /** - * Wrapper function to find variants for chosen Google Fonts - * Example: generate_get_google_font_variation( 'Open Sans' ) - * - * @since 1.3.0 - * - * @param string $font The font to look up. - * @param string $key The option to look up. - */ - function generate_get_google_font_variants( $font, $key = '' ) { - // Don't need variants if we're using a system font. - if ( in_array( $font, generate_typography_default_fonts() ) ) { - return; - } - - // Return if we have our variants saved. - if ( '' !== $key && get_theme_mod( $key . '_variants' ) ) { - return get_theme_mod( $key . '_variants' ); - } - - $defaults = generate_get_default_fonts(); - - if ( $defaults[ $key ] === $font ) { - return $defaults[ $key . '_variants' ]; - } - - // Grab all of our fonts. - // It's a big list, so hopefully we're not even still reading. - $fonts = generate_get_all_google_fonts(); - - // Get the ID from our font. - $id = strtolower( str_replace( ' ', '_', $font ) ); - - // If the ID doesn't exist within our fonts, we can bail. - if ( ! array_key_exists( $id, $fonts ) ) { - return; - } - - // Grab all of the variants associated with our font. - $variants = $fonts[ $id ]['variants']; - - // Loop through them and put them into an array, then turn them into a comma separated list. - $output = array(); - if ( $variants ) { - foreach ( $variants as $variant ) { - $output[] = $variant; - } - - return implode( ',', apply_filters( 'generate_typography_variants', $output ) ); - } - } -} - -if ( ! function_exists( 'generate_get_google_font_category' ) ) { - /** - * Wrapper function to find the category for chosen Google Font - * Example: generate_get_google_font_category( 'Open Sans' ) - * - * @since 1.3.0 - * - * @param string $font The name of our font. - * @param string $key The ID of the font setting. - * @return string The category of our font. - */ - function generate_get_google_font_category( $font, $key = '' ) { - // Don't need a category if we're using a system font. - if ( in_array( $font, generate_typography_default_fonts() ) ) { - return; - } - - // Return if we have our variants saved. - if ( '' !== $key && get_theme_mod( $key . '_category' ) ) { - return ', ' . get_theme_mod( $key . '_category' ); - } - - $defaults = generate_get_default_fonts(); - - // If our default font is selected and the category isn't saved, we already know the category. - if ( $defaults[ $key ] === $font ) { - return ', ' . $defaults[ $key . '_category' ]; - } - - // Grab all of our fonts. - // It's a big list, so hopefully we're not even still reading. - $fonts = generate_get_all_google_fonts(); - - // Get the ID from our font. - $id = strtolower( str_replace( ' ', '_', $font ) ); - - // If the ID doesn't exist within our fonts, we can bail. - if ( ! array_key_exists( $id, $fonts ) ) { - return; - } - - // Let's grab our category to go with our font. - $category = ! empty( $fonts[ $id ]['category'] ) ? ', ' . $fonts[ $id ]['category'] : ''; - - return $category; - } -} - - - -if ( ! function_exists( 'generate_get_font_family_css' ) ) { - /** - * Wrapper function to create font-family value for CSS. - * - * @since 1.3.0 - * - * @param string $font The name of our font. - * @param string $settings The ID of the settings we're looking up. - * @param array $default The defaults for our $settings. - * @return string The CSS value for our font family. - */ - function generate_get_font_family_css( $font, $settings, $default ) { - $generate_settings = wp_parse_args( - get_option( $settings, array() ), - $default - ); - - // We don't want to wrap quotes around these values. - $no_quotes = array( - 'inherit', - 'Arial, Helvetica, sans-serif', - 'Georgia, Times New Roman, Times, serif', - 'Helvetica', - 'Impact', - 'Segoe UI, Helvetica Neue, Helvetica, sans-serif', - 'Tahoma, Geneva, sans-serif', - 'Trebuchet MS, Helvetica, sans-serif', - 'Verdana, Geneva, sans-serif', - apply_filters( 'generate_typography_system_stack', '-apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"' ), - ); - - $font_family = $generate_settings[ $font ]; - - if ( 'System Stack' === $font_family ) { - $font_family = apply_filters( 'generate_typography_system_stack', '-apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"' ); - } - - // If our value is still using the old format, fix it. - if ( strpos( $font_family, ':' ) !== false ) { - $font_family = current( explode( ':', $font_family ) ); - } - - // Set up our wrapper. - if ( in_array( $font_family, $no_quotes ) ) { - $wrapper_start = null; - $wrapper_end = null; - } else { - $wrapper_start = '"'; - $wrapper_end = '"' . generate_get_google_font_category( $font_family, $font ); - } - - $output = ( 'inherit' === $font_family ) ? '' : $wrapper_start . $font_family . $wrapper_end; - - return $output; - } -} - -if ( ! function_exists( 'generate_add_to_font_customizer_list' ) ) { - add_filter( 'generate_typography_customize_list', 'generate_add_to_font_customizer_list' ); - /** - * This function makes sure your selected typography option exists in the Customizer list - * Why wouldn't it? Originally, all 800+ fonts were in each list. This has been reduced to 200. - * This functions makes sure that if you were using a font that is now not included in the 200, you won't lose it. - * - * @since 1.3.40 - * - * @param array $fonts The existing fonts. - */ - function generate_add_to_font_customizer_list( $fonts ) { - // Bail if we don't have our defaults. - if ( ! function_exists( 'generate_get_default_fonts' ) ) { - return; - } - - $generate_settings = wp_parse_args( - get_option( 'generate_settings', array() ), - generate_get_default_fonts() - ); - - $font_settings = array( - 'font_body', - 'font_top_bar', - 'font_site_title', - 'font_site_tagline', - 'font_navigation', - 'font_widget_title', - 'font_heading_1', - 'font_heading_2', - 'font_heading_3', - ); - - $all_fonts = generate_get_all_google_fonts(); - $select_fonts = generate_get_all_google_fonts( apply_filters( 'generate_number_of_fonts', 200 ) ); - - foreach ( $font_settings as $setting ) { - // If we don't have a setting, keep going. - if ( ! isset( $generate_settings[ $setting ] ) ) { - continue; - } - - $id = strtolower( str_replace( ' ', '_', $generate_settings[ $setting ] ) ); - - if ( array_key_exists( $id, $select_fonts ) || in_array( $generate_settings[ $setting ], generate_typography_default_fonts() ) ) { - continue; - } - - $fonts[ strtolower( str_replace( ' ', '_', $generate_settings[ $setting ] ) ) ] = array( - 'name' => $generate_settings[ $setting ], - 'variants' => array_key_exists( $id, $all_fonts ) ? $all_fonts[ $id ]['variants'] : array(), - 'category' => array_key_exists( $id, $all_fonts ) ? $all_fonts[ $id ]['category'] : 'sans-serif', - ); - } - - if ( function_exists( 'generate_secondary_nav_get_defaults' ) ) { - $secondary_nav_settings = wp_parse_args( - get_option( 'generate_secondary_nav_settings', array() ), - generate_secondary_nav_get_defaults() - ); - - $secondary_nav_id = strtolower( str_replace( ' ', '_', $secondary_nav_settings['font_secondary_navigation'] ) ); - - if ( ! array_key_exists( $secondary_nav_id, $select_fonts ) && ! in_array( $secondary_nav_settings['font_secondary_navigation'], generate_typography_default_fonts() ) ) { - $fonts[ strtolower( str_replace( ' ', '_', $secondary_nav_settings['font_secondary_navigation'] ) ) ] = array( - 'name' => $secondary_nav_settings['font_secondary_navigation'], - 'variants' => array_key_exists( $secondary_nav_id, $all_fonts ) ? $all_fonts[ $secondary_nav_id ]['variants'] : array(), - 'category' => array_key_exists( $secondary_nav_id, $all_fonts ) ? $all_fonts[ $secondary_nav_id ]['category'] : 'sans-serif', - ); - } - } - - return $fonts; - } -} - -if ( ! function_exists( 'generate_typography_set_font_data' ) ) { - add_action( 'admin_init', 'generate_typography_set_font_data' ); - /** - * This function will check to see if your category and variants are saved - * If not, it will set them for you - * Generally, set_theme_mod isn't best practice, but this is here for migration purposes for a set amount of time only - * Any time a user saves a font in the Customizer from now on, the category and variants are saved as theme_mods, so this function won't be necessary. - * - * @since 1.3.40 - */ - function generate_typography_set_font_data() { - // Get our defaults. - $defaults = generate_get_default_fonts(); - - // Get our settings. - $generate_settings = wp_parse_args( - get_option( 'generate_settings', array() ), - $defaults - ); - - // We don't need to do this if we're using the default font, as these values have defaults already. - if ( $defaults['font_body'] == $generate_settings['font_body'] ) { // phpcs:ignore - return; - } - - // Don't need to continue if we're using a system font or our default font. - if ( in_array( $generate_settings['font_body'], generate_typography_default_fonts() ) ) { - return; - } - - // Don't continue if our category and variants are already set. - if ( get_theme_mod( 'font_body_category' ) && get_theme_mod( 'font_body_variants' ) ) { - return; - } - - // Get all of our fonts. - $fonts = generate_get_all_google_fonts(); - - // Get the ID from our font. - $id = strtolower( str_replace( ' ', '_', $generate_settings['font_body'] ) ); - - // If the ID doesn't exist within our fonts, we can bail. - if ( ! array_key_exists( $id, $fonts ) ) { - return; - } - - // Let's grab our category to go with our font. - $category = ! empty( $fonts[ $id ]['category'] ) ? $fonts[ $id ]['category'] : ''; - - // Grab all of the variants associated with our font. - $variants = $fonts[ $id ]['variants']; - - // Loop through our variants and put them into an array, then turn them into a comma separated list. - $output = array(); - if ( $variants ) { - foreach ( $variants as $variant ) { - $output[] = $variant; - } - $variants = implode( ',', $output ); - } - - // Set our theme mods with our new settings. - if ( '' !== $category ) { - set_theme_mod( 'font_body_category', $category ); - } - - if ( '' !== $variants ) { - set_theme_mod( 'font_body_variants', $variants ); - } - } -} +register_control_type( 'Generate_Typography_Customize_Control' ); + $wp_customize->register_control_type( 'Generate_Range_Slider_Control' ); + } + + $wp_customize->add_section( + 'font_section', + array( + 'title' => __( 'Typography', 'generatepress' ), + 'capability' => 'edit_theme_options', + 'priority' => 30, + ) + ); + + $wp_customize->add_setting( + 'generate_settings[font_body]', + array( + 'default' => $defaults['font_body'], + 'type' => 'option', + 'sanitize_callback' => 'sanitize_text_field', + ) + ); + + $wp_customize->add_setting( + 'font_body_category', + array( + 'default' => $defaults['font_body_category'], + 'sanitize_callback' => 'sanitize_text_field', + ) + ); + + $wp_customize->add_setting( + 'font_body_variants', + array( + 'default' => $defaults['font_body_variants'], + 'sanitize_callback' => 'generate_sanitize_variants', + ) + ); + + $wp_customize->add_setting( + 'generate_settings[body_font_weight]', + array( + 'default' => $defaults['body_font_weight'], + 'type' => 'option', + 'sanitize_callback' => 'sanitize_key', + 'transport' => 'postMessage', + ) + ); + + $wp_customize->add_setting( + 'generate_settings[body_font_transform]', + array( + 'default' => $defaults['body_font_transform'], + 'type' => 'option', + 'sanitize_callback' => 'sanitize_key', + 'transport' => 'postMessage', + + ) + ); + + $wp_customize->add_control( + new Generate_Typography_Customize_Control( + $wp_customize, + 'body_typography', + array( + 'label' => __( 'Body', 'generatepress' ), + 'section' => 'font_section', + 'priority' => 1, + 'settings' => array( + 'family' => 'generate_settings[font_body]', + 'variant' => 'font_body_variants', + 'category' => 'font_body_category', + 'weight' => 'generate_settings[body_font_weight]', + 'transform' => 'generate_settings[body_font_transform]', + ), + ) + ) + ); + + $wp_customize->add_setting( + 'generate_settings[body_font_size]', + array( + 'default' => $defaults['body_font_size'], + 'type' => 'option', + 'sanitize_callback' => 'generate_sanitize_integer', + 'transport' => 'postMessage', + ) + ); + + $wp_customize->add_control( + new Generate_Range_Slider_Control( + $wp_customize, + 'generate_settings[body_font_size]', + array( + 'type' => 'generatepress-range-slider', + 'description' => __( 'Font size', 'generatepress' ), + 'section' => 'font_section', + 'settings' => array( + 'desktop' => 'generate_settings[body_font_size]', + ), + 'choices' => array( + 'desktop' => array( + 'min' => 6, + 'max' => 25, + 'step' => 1, + 'edit' => true, + 'unit' => 'px', + ), + ), + ) + ) + ); + + $wp_customize->add_setting( + 'generate_settings[body_line_height]', + array( + 'default' => $defaults['body_line_height'], + 'type' => 'option', + 'sanitize_callback' => 'generate_sanitize_decimal_integer', + 'transport' => 'postMessage', + ) + ); + + $wp_customize->add_control( + new Generate_Range_Slider_Control( + $wp_customize, + 'generate_settings[body_line_height]', + array( + 'type' => 'generatepress-range-slider', + 'description' => __( 'Line height', 'generatepress' ), + 'section' => 'font_section', + 'settings' => array( + 'desktop' => 'generate_settings[body_line_height]', + ), + 'choices' => array( + 'desktop' => array( + 'min' => 1, + 'max' => 3, + 'step' => .1, + 'edit' => true, + 'unit' => '', + ), + ), + ) + ) + ); + + $wp_customize->add_setting( + 'generate_settings[paragraph_margin]', + array( + 'default' => $defaults['paragraph_margin'], + 'type' => 'option', + 'sanitize_callback' => 'generate_sanitize_decimal_integer', + 'transport' => 'postMessage', + ) + ); + + $wp_customize->add_control( + new Generate_Range_Slider_Control( + $wp_customize, + 'generate_settings[paragraph_margin]', + array( + 'type' => 'generatepress-range-slider', + 'description' => __( 'Paragraph margin', 'generatepress' ), + 'section' => 'font_section', + 'settings' => array( + 'desktop' => 'generate_settings[paragraph_margin]', + ), + 'choices' => array( + 'desktop' => array( + 'min' => 0, + 'max' => 5, + 'step' => .1, + 'edit' => true, + 'unit' => 'em', + ), + ), + ) + ) + ); + + $wp_customize->add_setting( + 'generate_settings[font_heading_1]', + array( + 'default' => $defaults['font_heading_1'], + 'type' => 'option', + 'sanitize_callback' => 'sanitize_text_field', + ) + ); + + $wp_customize->add_setting( + 'font_heading_1_category', + array( + 'default' => '', + 'sanitize_callback' => 'sanitize_text_field', + ) + ); + + $wp_customize->add_setting( + 'font_heading_1_variants', + array( + 'default' => '', + 'sanitize_callback' => 'generate_sanitize_variants', + ) + ); + + $wp_customize->add_setting( + 'generate_settings[heading_1_weight]', + array( + 'default' => $defaults['heading_1_weight'], + 'type' => 'option', + 'sanitize_callback' => 'sanitize_key', + 'transport' => 'postMessage', + ) + ); + + $wp_customize->add_setting( + 'generate_settings[heading_1_transform]', + array( + 'default' => $defaults['heading_1_transform'], + 'type' => 'option', + 'sanitize_callback' => 'sanitize_key', + 'transport' => 'postMessage', + ) + ); + + $wp_customize->add_control( + new Generate_Typography_Customize_Control( + $wp_customize, + 'font_heading_1_control', + array( + 'label' => __( 'Heading 1 (H1)', 'generatepress' ), + 'section' => 'font_section', + 'settings' => array( + 'family' => 'generate_settings[font_heading_1]', + 'variant' => 'font_heading_1_variants', + 'category' => 'font_heading_1_category', + 'weight' => 'generate_settings[heading_1_weight]', + 'transform' => 'generate_settings[heading_1_transform]', + ), + ) + ) + ); + + $wp_customize->add_setting( + 'generate_settings[heading_1_font_size]', + array( + 'default' => $defaults['heading_1_font_size'], + 'type' => 'option', + 'sanitize_callback' => 'absint', + 'transport' => 'postMessage', + ) + ); + + $wp_customize->add_setting( + 'generate_settings[mobile_heading_1_font_size]', + array( + 'default' => $defaults['mobile_heading_1_font_size'], + 'type' => 'option', + 'sanitize_callback' => 'generate_sanitize_empty_absint', + 'transport' => 'postMessage', + ) + ); + + $wp_customize->add_control( + new Generate_Range_Slider_Control( + $wp_customize, + 'h1_font_sizes', + array( + 'description' => __( 'Font size', 'generatepress' ), + 'section' => 'font_section', + 'settings' => array( + 'desktop' => 'generate_settings[heading_1_font_size]', + 'mobile' => 'generate_settings[mobile_heading_1_font_size]', + ), + 'choices' => array( + 'desktop' => array( + 'min' => 15, + 'max' => 100, + 'step' => 1, + 'edit' => true, + 'unit' => 'px', + ), + 'mobile' => array( + 'min' => 15, + 'max' => 100, + 'step' => 1, + 'edit' => true, + 'unit' => 'px', + ), + ), + ) + ) + ); + + $wp_customize->add_setting( + 'generate_settings[heading_1_line_height]', + array( + 'default' => $defaults['heading_1_line_height'], + 'type' => 'option', + 'sanitize_callback' => 'generate_sanitize_decimal_integer', + 'transport' => 'postMessage', + ) + ); + + $wp_customize->add_control( + new Generate_Range_Slider_Control( + $wp_customize, + 'generate_settings[heading_1_line_height]', + array( + 'description' => __( 'Line height', 'generatepress' ), + 'section' => 'font_section', + 'settings' => array( + 'desktop' => 'generate_settings[heading_1_line_height]', + ), + 'choices' => array( + 'desktop' => array( + 'min' => 0, + 'max' => 5, + 'step' => .1, + 'edit' => true, + 'unit' => 'em', + ), + ), + ) + ) + ); + + $wp_customize->add_setting( + 'generate_settings[font_heading_2]', + array( + 'default' => $defaults['font_heading_2'], + 'type' => 'option', + 'sanitize_callback' => 'sanitize_text_field', + ) + ); + + $wp_customize->add_setting( + 'font_heading_2_category', + array( + 'default' => '', + 'sanitize_callback' => 'sanitize_text_field', + ) + ); + + $wp_customize->add_setting( + 'font_heading_2_variants', + array( + 'default' => '', + 'sanitize_callback' => 'generate_sanitize_variants', + ) + ); + + $wp_customize->add_setting( + 'generate_settings[heading_2_weight]', + array( + 'default' => $defaults['heading_2_weight'], + 'type' => 'option', + 'sanitize_callback' => 'sanitize_key', + 'transport' => 'postMessage', + ) + ); + + $wp_customize->add_setting( + 'generate_settings[heading_2_transform]', + array( + 'default' => $defaults['heading_2_transform'], + 'type' => 'option', + 'sanitize_callback' => 'sanitize_key', + 'transport' => 'postMessage', + ) + ); + + $wp_customize->add_control( + new Generate_Typography_Customize_Control( + $wp_customize, + 'font_heading_2_control', + array( + 'label' => __( 'Heading 2 (H2)', 'generatepress' ), + 'section' => 'font_section', + 'settings' => array( + 'family' => 'generate_settings[font_heading_2]', + 'variant' => 'font_heading_2_variants', + 'category' => 'font_heading_2_category', + 'weight' => 'generate_settings[heading_2_weight]', + 'transform' => 'generate_settings[heading_2_transform]', + ), + ) + ) + ); + + $wp_customize->add_setting( + 'generate_settings[heading_2_font_size]', + array( + 'default' => $defaults['heading_2_font_size'], + 'type' => 'option', + 'sanitize_callback' => 'absint', + 'transport' => 'postMessage', + ) + ); + + $wp_customize->add_setting( + 'generate_settings[mobile_heading_2_font_size]', + array( + 'default' => $defaults['mobile_heading_2_font_size'], + 'type' => 'option', + 'sanitize_callback' => 'generate_sanitize_empty_absint', + 'transport' => 'postMessage', + ) + ); + + $wp_customize->add_control( + new Generate_Range_Slider_Control( + $wp_customize, + 'h2_font_sizes', + array( + 'description' => __( 'Font size', 'generatepress' ), + 'section' => 'font_section', + 'settings' => array( + 'desktop' => 'generate_settings[heading_2_font_size]', + 'mobile' => 'generate_settings[mobile_heading_2_font_size]', + ), + 'choices' => array( + 'desktop' => array( + 'min' => 10, + 'max' => 80, + 'step' => 1, + 'edit' => true, + 'unit' => 'px', + ), + 'mobile' => array( + 'min' => 10, + 'max' => 80, + 'step' => 1, + 'edit' => true, + 'unit' => 'px', + ), + ), + ) + ) + ); + + $wp_customize->add_setting( + 'generate_settings[heading_2_line_height]', + array( + 'default' => $defaults['heading_2_line_height'], + 'type' => 'option', + 'sanitize_callback' => 'generate_sanitize_decimal_integer', + 'transport' => 'postMessage', + ) + ); + + $wp_customize->add_control( + new Generate_Range_Slider_Control( + $wp_customize, + 'generate_settings[heading_2_line_height]', + array( + 'description' => __( 'Line height', 'generatepress' ), + 'section' => 'font_section', + 'settings' => array( + 'desktop' => 'generate_settings[heading_2_line_height]', + ), + 'choices' => array( + 'desktop' => array( + 'min' => 0, + 'max' => 5, + 'step' => .1, + 'edit' => true, + 'unit' => 'em', + ), + ), + ) + ) + ); + + $wp_customize->add_setting( + 'generate_settings[font_heading_3]', + array( + 'default' => $defaults['font_heading_3'], + 'type' => 'option', + 'sanitize_callback' => 'sanitize_text_field', + ) + ); + + $wp_customize->add_setting( + 'font_heading_3_category', + array( + 'default' => '', + 'sanitize_callback' => 'sanitize_text_field', + ) + ); + + $wp_customize->add_setting( + 'font_heading_3_variants', + array( + 'default' => '', + 'sanitize_callback' => 'generate_sanitize_variants', + ) + ); + + $wp_customize->add_setting( + 'generate_settings[heading_3_weight]', + array( + 'default' => $defaults['heading_3_weight'], + 'type' => 'option', + 'sanitize_callback' => 'sanitize_key', + 'transport' => 'postMessage', + ) + ); + + $wp_customize->add_setting( + 'generate_settings[heading_3_transform]', + array( + 'default' => $defaults['heading_3_transform'], + 'type' => 'option', + 'sanitize_callback' => 'sanitize_key', + 'transport' => 'postMessage', + ) + ); + + $wp_customize->add_control( + new Generate_Typography_Customize_Control( + $wp_customize, + 'font_heading_3_control', + array( + 'label' => __( 'Heading 3 (H3)', 'generatepress' ), + 'section' => 'font_section', + 'settings' => array( + 'family' => 'generate_settings[font_heading_3]', + 'variant' => 'font_heading_3_variants', + 'category' => 'font_heading_3_category', + 'weight' => 'generate_settings[heading_3_weight]', + 'transform' => 'generate_settings[heading_3_transform]', + ), + ) + ) + ); + + $wp_customize->add_setting( + 'generate_settings[heading_3_font_size]', + array( + 'default' => $defaults['heading_3_font_size'], + 'type' => 'option', + 'sanitize_callback' => 'absint', + 'transport' => 'postMessage', + ) + ); + + $wp_customize->add_control( + new Generate_Range_Slider_Control( + $wp_customize, + 'h3_font_sizes', + array( + 'description' => __( 'Font size', 'generatepress' ), + 'section' => 'font_section', + 'settings' => array( + 'desktop' => 'generate_settings[heading_3_font_size]', + ), + 'choices' => array( + 'desktop' => array( + 'min' => 10, + 'max' => 80, + 'step' => 1, + 'edit' => true, + 'unit' => 'px', + ), + ), + ) + ) + ); + + $wp_customize->add_setting( + 'generate_settings[heading_3_line_height]', + array( + 'default' => $defaults['heading_3_line_height'], + 'type' => 'option', + 'sanitize_callback' => 'generate_sanitize_decimal_integer', + 'transport' => 'postMessage', + ) + ); + + $wp_customize->add_control( + new Generate_Range_Slider_Control( + $wp_customize, + 'generate_settings[heading_3_line_height]', + array( + 'description' => __( 'Line height', 'generatepress' ), + 'section' => 'font_section', + 'settings' => array( + 'desktop' => 'generate_settings[heading_3_line_height]', + ), + 'choices' => array( + 'desktop' => array( + 'min' => 0, + 'max' => 5, + 'step' => .1, + 'edit' => true, + 'unit' => 'em', + ), + ), + ) + ) + ); + + if ( ! function_exists( 'generate_fonts_customize_register' ) && ! defined( 'GP_PREMIUM_VERSION' ) ) { + $wp_customize->add_control( + new Generate_Customize_Misc_Control( + $wp_customize, + 'typography_get_addon_desc', + array( + 'section' => 'font_section', + 'type' => 'addon', + 'label' => __( 'Learn more', 'generatepress' ), + 'description' => __( 'More options are available for this section in our premium version.', 'generatepress' ), + 'url' => generate_get_premium_url( 'https://generatepress.com/premium/#typography', false ), + 'priority' => 50, + 'settings' => ( isset( $wp_customize->selective_refresh ) ) ? array() : 'blogname', + ) + ) + ); + } + } +} + +if ( ! function_exists( 'generate_get_all_google_fonts' ) ) { + /** + * Return an array of all of our Google Fonts. + * + * @since 1.3.0 + * @param string $amount How many fonts to return. + * @return array The list of Google Fonts. + */ + function generate_get_all_google_fonts( $amount = 'all' ) { + // Our big list Google Fonts. + // We use json_decode to reduce PHP memory usage. + // Adding them as a PHP array seems to use quite a bit more memory. + $content = json_decode( '[{"family":"Roboto","category":"sans-serif","variants":["100","100italic","300","300italic","regular","italic","500","500italic","700","700italic","900","900italic"]},{"family":"Open Sans","category":"sans-serif","variants":["300","300italic","regular","italic","600","600italic","700","700italic","800","800italic"]},{"family":"Lato","category":"sans-serif","variants":["100","100italic","300","300italic","regular","italic","700","700italic","900","900italic"]},{"family":"Slabo 27px","category":"serif","variants":["regular"]},{"family":"Oswald","category":"sans-serif","variants":["200","300","regular","500","600","700"]},{"family":"Roboto Condensed","category":"sans-serif","variants":["300","300italic","regular","italic","700","700italic"]},{"family":"Source Sans Pro","category":"sans-serif","variants":["200","200italic","300","300italic","regular","italic","600","600italic","700","700italic","900","900italic"]},{"family":"Montserrat","category":"sans-serif","variants":["100","100italic","200","200italic","300","300italic","regular","italic","500","500italic","600","600italic","700","700italic","800","800italic","900","900italic"]},{"family":"Raleway","category":"sans-serif","variants":["100","100italic","200","200italic","300","300italic","regular","italic","500","500italic","600","600italic","700","700italic","800","800italic","900","900italic"]},{"family":"PT Sans","category":"sans-serif","variants":["regular","italic","700","700italic"]},{"family":"Roboto Slab","category":"serif","variants":["100","300","regular","700"]},{"family":"Merriweather","category":"serif","variants":["300","300italic","regular","italic","700","700italic","900","900italic"]},{"family":"Open Sans Condensed","category":"sans-serif","variants":["300","300italic","700"]},{"family":"Droid Sans","category":"sans-serif","variants":["regular","700"]},{"family":"Lora","category":"serif","variants":["regular","italic","700","700italic"]},{"family":"Ubuntu","category":"sans-serif","variants":["300","300italic","regular","italic","500","500italic","700","700italic"]},{"family":"Droid Serif","category":"serif","variants":["regular","italic","700","700italic"]},{"family":"Playfair Display","category":"serif","variants":["regular","italic","700","700italic","900","900italic"]},{"family":"Arimo","category":"sans-serif","variants":["regular","italic","700","700italic"]},{"family":"Noto Sans","category":"sans-serif","variants":["regular","italic","700","700italic"]},{"family":"PT Serif","category":"serif","variants":["regular","italic","700","700italic"]},{"family":"Titillium Web","category":"sans-serif","variants":["200","200italic","300","300italic","regular","italic","600","600italic","700","700italic","900"]},{"family":"PT Sans Narrow","category":"sans-serif","variants":["regular","700"]},{"family":"Muli","category":"sans-serif","variants":["200","200italic","300","300italic","regular","italic","600","600italic","700","700italic","800","800italic","900","900italic"]},{"family":"Indie Flower","category":"handwriting","variants":["regular"]},{"family":"Bitter","category":"serif","variants":["regular","italic","700"]},{"family":"Poppins","category":"sans-serif","variants":["300","regular","500","600","700"]},{"family":"Inconsolata","category":"monospace","variants":["regular","700"]},{"family":"Dosis","category":"sans-serif","variants":["200","300","regular","500","600","700","800"]},{"family":"Fjalla One","category":"sans-serif","variants":["regular"]},{"family":"Oxygen","category":"sans-serif","variants":["300","regular","700"]},{"family":"Hind","category":"sans-serif","variants":["300","regular","500","600","700"]},{"family":"Cabin","category":"sans-serif","variants":["regular","italic","500","500italic","600","600italic","700","700italic"]},{"family":"Anton","category":"sans-serif","variants":["regular"]},{"family":"Arvo","category":"serif","variants":["regular","italic","700","700italic"]},{"family":"Noto Serif","category":"serif","variants":["regular","italic","700","700italic"]},{"family":"Crimson Text","category":"serif","variants":["regular","italic","600","600italic","700","700italic"]},{"family":"Lobster","category":"display","variants":["regular"]},{"family":"Yanone Kaffeesatz","category":"sans-serif","variants":["200","300","regular","700"]},{"family":"Nunito","category":"sans-serif","variants":["200","200italic","300","300italic","regular","italic","600","600italic","700","700italic","800","800italic","900","900italic"]},{"family":"Bree Serif","category":"serif","variants":["regular"]},{"family":"Catamaran","category":"sans-serif","variants":["100","200","300","regular","500","600","700","800","900"]},{"family":"Libre Baskerville","category":"serif","variants":["regular","italic","700"]},{"family":"Abel","category":"sans-serif","variants":["regular"]},{"family":"Josefin Sans","category":"sans-serif","variants":["100","100italic","300","300italic","regular","italic","600","600italic","700","700italic"]},{"family":"Fira Sans","category":"sans-serif","variants":["100","100italic","200","200italic","300","300italic","regular","italic","500","500italic","600","600italic","700","700italic","800","800italic","900","900italic"]},{"family":"Gloria Hallelujah","category":"handwriting","variants":["regular"]},{"family":"Abril Fatface","category":"display","variants":["regular"]},{"family":"Exo 2","category":"sans-serif","variants":["100","100italic","200","200italic","300","300italic","regular","italic","500","500italic","600","600italic","700","700italic","800","800italic","900","900italic"]},{"family":"Merriweather Sans","category":"sans-serif","variants":["300","300italic","regular","italic","700","700italic","800","800italic"]},{"family":"Pacifico","category":"handwriting","variants":["regular"]},{"family":"Roboto Mono","category":"monospace","variants":["100","100italic","300","300italic","regular","italic","500","500italic","700","700italic"]},{"family":"Varela Round","category":"sans-serif","variants":["regular"]},{"family":"Asap","category":"sans-serif","variants":["regular","italic","500","500italic","700","700italic"]},{"family":"Amatic SC","category":"handwriting","variants":["regular","700"]},{"family":"Quicksand","category":"sans-serif","variants":["300","regular","500","700"]},{"family":"Karla","category":"sans-serif","variants":["regular","italic","700","700italic"]},{"family":"Ubuntu Condensed","category":"sans-serif","variants":["regular"]},{"family":"Signika","category":"sans-serif","variants":["300","regular","600","700"]},{"family":"Alegreya","category":"serif","variants":["regular","italic","700","700italic","900","900italic"]},{"family":"Questrial","category":"sans-serif","variants":["regular"]},{"family":"Rubik","category":"sans-serif","variants":["300","300italic","regular","italic","500","500italic","700","700italic","900","900italic"]},{"family":"Shadows Into Light","category":"handwriting","variants":["regular"]},{"family":"PT Sans Caption","category":"sans-serif","variants":["regular","700"]},{"family":"Archivo Narrow","category":"sans-serif","variants":["regular","italic","700","700italic"]},{"family":"Play","category":"sans-serif","variants":["regular","700"]},{"family":"Cuprum","category":"sans-serif","variants":["regular","italic","700","700italic"]},{"family":"Dancing Script","category":"handwriting","variants":["regular","700"]},{"family":"Rokkitt","category":"serif","variants":["100","200","300","regular","500","600","700","800","900"]},{"family":"Work Sans","category":"sans-serif","variants":["100","200","300","regular","500","600","700","800","900"]},{"family":"Francois One","category":"sans-serif","variants":["regular"]},{"family":"Vollkorn","category":"serif","variants":["regular","italic","700","700italic"]},{"family":"Source Code Pro","category":"monospace","variants":["200","300","regular","500","600","700","900"]},{"family":"Exo","category":"sans-serif","variants":["100","100italic","200","200italic","300","300italic","regular","italic","500","500italic","600","600italic","700","700italic","800","800italic","900","900italic"]},{"family":"Maven Pro","category":"sans-serif","variants":["regular","500","700","900"]},{"family":"Architects Daughter","category":"handwriting","variants":["regular"]},{"family":"Orbitron","category":"sans-serif","variants":["regular","500","700","900"]},{"family":"Pathway Gothic One","category":"sans-serif","variants":["regular"]},{"family":"Acme","category":"sans-serif","variants":["regular"]},{"family":"Ropa Sans","category":"sans-serif","variants":["regular","italic"]},{"family":"Patua One","category":"display","variants":["regular"]},{"family":"EB Garamond","category":"serif","variants":["regular"]},{"family":"Lobster Two","category":"display","variants":["regular","italic","700","700italic"]},{"family":"Crete Round","category":"serif","variants":["regular","italic"]},{"family":"Cinzel","category":"serif","variants":["regular","700","900"]},{"family":"Josefin Slab","category":"serif","variants":["100","100italic","300","300italic","regular","italic","600","600italic","700","700italic"]},{"family":"Source Serif Pro","category":"serif","variants":["regular","600","700"]},{"family":"Alegreya Sans","category":"sans-serif","variants":["100","100italic","300","300italic","regular","italic","500","500italic","700","700italic","800","800italic","900","900italic"]},{"family":"Comfortaa","category":"display","variants":["300","regular","700"]},{"family":"Russo One","category":"sans-serif","variants":["regular"]},{"family":"News Cycle","category":"sans-serif","variants":["regular","700"]},{"family":"ABeeZee","category":"sans-serif","variants":["regular","italic"]},{"family":"Yellowtail","category":"handwriting","variants":["regular"]},{"family":"Noticia Text","category":"serif","variants":["regular","italic","700","700italic"]},{"family":"Monda","category":"sans-serif","variants":["regular","700"]},{"family":"Quattrocento Sans","category":"sans-serif","variants":["regular","italic","700","700italic"]},{"family":"Hammersmith One","category":"sans-serif","variants":["regular"]},{"family":"Libre Franklin","category":"sans-serif","variants":["100","100italic","200","200italic","300","300italic","regular","italic","500","500italic","600","600italic","700","700italic","800","800italic","900","900italic"]},{"family":"Satisfy","category":"handwriting","variants":["regular"]},{"family":"Pontano Sans","category":"sans-serif","variants":["regular"]},{"family":"Righteous","category":"display","variants":["regular"]},{"family":"Poiret One","category":"display","variants":["regular"]},{"family":"BenchNine","category":"sans-serif","variants":["300","regular","700"]},{"family":"Arapey","category":"serif","variants":["regular","italic"]},{"family":"Kaushan Script","category":"handwriting","variants":["regular"]},{"family":"Economica","category":"sans-serif","variants":["regular","italic","700","700italic"]},{"family":"Kanit","category":"sans-serif","variants":["100","100italic","200","200italic","300","300italic","regular","italic","500","500italic","600","600italic","700","700italic","800","800italic","900","900italic"]},{"family":"Old Standard TT","category":"serif","variants":["regular","italic","700"]},{"family":"Sanchez","category":"serif","variants":["regular","italic"]},{"family":"Courgette","category":"handwriting","variants":["regular"]},{"family":"Quattrocento","category":"serif","variants":["regular","700"]},{"family":"Domine","category":"serif","variants":["regular","700"]},{"family":"Gudea","category":"sans-serif","variants":["regular","italic","700"]},{"family":"Permanent Marker","category":"handwriting","variants":["regular"]},{"family":"Armata","category":"sans-serif","variants":["regular"]},{"family":"Cantarell","category":"sans-serif","variants":["regular","italic","700","700italic"]},{"family":"Archivo Black","category":"sans-serif","variants":["regular"]},{"family":"Istok Web","category":"sans-serif","variants":["regular","italic","700","700italic"]},{"family":"Cardo","category":"serif","variants":["regular","italic","700"]},{"family":"Playfair Display SC","category":"serif","variants":["regular","italic","700","700italic","900","900italic"]},{"family":"Passion One","category":"display","variants":["regular","700","900"]},{"family":"Tinos","category":"serif","variants":["regular","italic","700","700italic"]},{"family":"Cookie","category":"handwriting","variants":["regular"]},{"family":"Cormorant Garamond","category":"serif","variants":["300","300italic","regular","italic","500","500italic","600","600italic","700","700italic"]},{"family":"Philosopher","category":"sans-serif","variants":["regular","italic","700","700italic"]},{"family":"Yantramanav","category":"sans-serif","variants":["100","300","regular","500","700","900"]},{"family":"Chewy","category":"display","variants":["regular"]},{"family":"Antic Slab","category":"serif","variants":["regular"]},{"family":"Handlee","category":"handwriting","variants":["regular"]},{"family":"Teko","category":"sans-serif","variants":["300","regular","500","600","700"]},{"family":"Boogaloo","category":"display","variants":["regular"]},{"family":"Vidaloka","category":"serif","variants":["regular"]},{"family":"Audiowide","category":"display","variants":["regular"]},{"family":"Coming Soon","category":"handwriting","variants":["regular"]},{"family":"Alfa Slab One","category":"display","variants":["regular"]},{"family":"Cabin Condensed","category":"sans-serif","variants":["regular","500","600","700"]},{"family":"Ruda","category":"sans-serif","variants":["regular","700","900"]},{"family":"Ek Mukta","category":"sans-serif","variants":["200","300","regular","500","600","700","800"]},{"family":"Changa One","category":"display","variants":["regular","italic"]},{"family":"Tangerine","category":"handwriting","variants":["regular","700"]},{"family":"Great Vibes","category":"handwriting","variants":["regular"]},{"family":"Sintony","category":"sans-serif","variants":["regular","700"]},{"family":"Khand","category":"sans-serif","variants":["300","regular","500","600","700"]},{"family":"Bevan","category":"display","variants":["regular"]},{"family":"Kalam","category":"handwriting","variants":["300","regular","700"]},{"family":"Days One","category":"sans-serif","variants":["regular"]},{"family":"Bangers","category":"display","variants":["regular"]},{"family":"Rajdhani","category":"sans-serif","variants":["300","regular","500","600","700"]},{"family":"Droid Sans Mono","category":"monospace","variants":["regular"]},{"family":"Kreon","category":"serif","variants":["300","regular","700"]},{"family":"Rambla","category":"sans-serif","variants":["regular","italic","700","700italic"]},{"family":"Shrikhand","category":"display","variants":["regular"]},{"family":"Fredoka One","category":"display","variants":["regular"]},{"family":"Shadows Into Light Two","category":"handwriting","variants":["regular"]},{"family":"Playball","category":"display","variants":["regular"]},{"family":"Neuton","category":"serif","variants":["200","300","regular","italic","700","800"]},{"family":"Copse","category":"serif","variants":["regular"]},{"family":"Didact Gothic","category":"sans-serif","variants":["regular"]},{"family":"Signika Negative","category":"sans-serif","variants":["300","regular","600","700"]},{"family":"Amiri","category":"serif","variants":["regular","italic","700","700italic"]},{"family":"Gentium Book Basic","category":"serif","variants":["regular","italic","700","700italic"]},{"family":"Glegoo","category":"serif","variants":["regular","700"]},{"family":"Oleo Script","category":"display","variants":["regular","700"]},{"family":"Voltaire","category":"sans-serif","variants":["regular"]},{"family":"Actor","category":"sans-serif","variants":["regular"]},{"family":"Amaranth","category":"sans-serif","variants":["regular","italic","700","700italic"]},{"family":"Paytone One","category":"sans-serif","variants":["regular"]},{"family":"Volkhov","category":"serif","variants":["regular","italic","700","700italic"]},{"family":"Sorts Mill Goudy","category":"serif","variants":["regular","italic"]},{"family":"Bad Script","category":"handwriting","variants":["regular"]},{"family":"Coda","category":"display","variants":["regular","800"]},{"family":"Damion","category":"handwriting","variants":["regular"]},{"family":"Sacramento","category":"handwriting","variants":["regular"]},{"family":"Squada One","category":"display","variants":["regular"]},{"family":"Rock Salt","category":"handwriting","variants":["regular"]},{"family":"Adamina","category":"serif","variants":["regular"]},{"family":"Alice","category":"serif","variants":["regular"]},{"family":"Cantata One","category":"serif","variants":["regular"]},{"family":"Luckiest Guy","category":"display","variants":["regular"]},{"family":"Rochester","category":"handwriting","variants":["regular"]},{"family":"Covered By Your Grace","category":"handwriting","variants":["regular"]},{"family":"Heebo","category":"sans-serif","variants":["100","300","regular","500","700","800","900"]},{"family":"VT323","category":"monospace","variants":["regular"]},{"family":"Nothing You Could Do","category":"handwriting","variants":["regular"]},{"family":"Patrick Hand","category":"handwriting","variants":["regular"]},{"family":"Gentium Basic","category":"serif","variants":["regular","italic","700","700italic"]},{"family":"Nobile","category":"sans-serif","variants":["regular","italic","700","700italic"]},{"family":"Rancho","category":"handwriting","variants":["regular"]},{"family":"Marck Script","category":"handwriting","variants":["regular"]},{"family":"Special Elite","category":"display","variants":["regular"]},{"family":"Julius Sans One","category":"sans-serif","variants":["regular"]},{"family":"Varela","category":"sans-serif","variants":["regular"]},{"family":"PT Mono","category":"monospace","variants":["regular"]},{"family":"Alex Brush","category":"handwriting","variants":["regular"]},{"family":"Homemade Apple","category":"handwriting","variants":["regular"]},{"family":"Scada","category":"sans-serif","variants":["regular","italic","700","700italic"]},{"family":"Jura","category":"sans-serif","variants":["300","regular","500","600"]},{"family":"Antic","category":"sans-serif","variants":["regular"]},{"family":"Gochi Hand","category":"handwriting","variants":["regular"]},{"family":"Sarala","category":"sans-serif","variants":["regular","700"]},{"family":"Electrolize","category":"sans-serif","variants":["regular"]},{"family":"Sigmar One","category":"display","variants":["regular"]},{"family":"Candal","category":"sans-serif","variants":["regular"]},{"family":"Prata","category":"serif","variants":["regular"]},{"family":"Homenaje","category":"sans-serif","variants":["regular"]},{"family":"Pinyon Script","category":"handwriting","variants":["regular"]},{"family":"Unica One","category":"display","variants":["regular"]},{"family":"Basic","category":"sans-serif","variants":["regular"]},{"family":"Neucha","category":"handwriting","variants":["regular"]},{"family":"Convergence","category":"sans-serif","variants":["regular"]},{"family":"Molengo","category":"sans-serif","variants":["regular"]},{"family":"Caveat Brush","category":"handwriting","variants":["regular"]},{"family":"Monoton","category":"display","variants":["regular"]},{"family":"Calligraffitti","category":"handwriting","variants":["regular"]},{"family":"Kameron","category":"serif","variants":["regular","700"]},{"family":"Share","category":"display","variants":["regular","italic","700","700italic"]},{"family":"Alegreya Sans SC","category":"sans-serif","variants":["100","100italic","300","300italic","regular","italic","500","500italic","700","700italic","800","800italic","900","900italic"]},{"family":"Enriqueta","category":"serif","variants":["regular","700"]},{"family":"Martel","category":"serif","variants":["200","300","regular","600","700","800","900"]},{"family":"Black Ops One","category":"display","variants":["regular"]},{"family":"Just Another Hand","category":"handwriting","variants":["regular"]},{"family":"Caveat","category":"handwriting","variants":["regular","700"]},{"family":"PT Serif Caption","category":"serif","variants":["regular","italic"]},{"family":"Ultra","category":"serif","variants":["regular"]},{"family":"Ubuntu Mono","category":"monospace","variants":["regular","italic","700","700italic"]},{"family":"Carme","category":"sans-serif","variants":["regular"]},{"family":"Cousine","category":"monospace","variants":["regular","italic","700","700italic"]},{"family":"Cherry Cream Soda","category":"display","variants":["regular"]},{"family":"Reenie Beanie","category":"handwriting","variants":["regular"]},{"family":"Hind Siliguri","category":"sans-serif","variants":["300","regular","500","600","700"]},{"family":"Bubblegum Sans","category":"display","variants":["regular"]},{"family":"Aldrich","category":"sans-serif","variants":["regular"]},{"family":"Lustria","category":"serif","variants":["regular"]},{"family":"Alef","category":"sans-serif","variants":["regular","700"]},{"family":"Freckle Face","category":"display","variants":["regular"]},{"family":"Fanwood Text","category":"serif","variants":["regular","italic"]},{"family":"Advent Pro","category":"sans-serif","variants":["100","200","300","regular","500","600","700"]},{"family":"Allura","category":"handwriting","variants":["regular"]},{"family":"Ceviche One","category":"display","variants":["regular"]},{"family":"Press Start 2P","category":"display","variants":["regular"]},{"family":"Overlock","category":"display","variants":["regular","italic","700","700italic","900","900italic"]},{"family":"Niconne","category":"handwriting","variants":["regular"]},{"family":"Limelight","category":"display","variants":["regular"]},{"family":"Frank Ruhl Libre","category":"sans-serif","variants":["300","regular","500","700","900"]},{"family":"Allerta Stencil","category":"sans-serif","variants":["regular"]},{"family":"Marcellus","category":"serif","variants":["regular"]},{"family":"Pragati Narrow","category":"sans-serif","variants":["regular","700"]},{"family":"Michroma","category":"sans-serif","variants":["regular"]},{"family":"Fauna One","category":"serif","variants":["regular"]},{"family":"Syncopate","category":"sans-serif","variants":["regular","700"]},{"family":"Telex","category":"sans-serif","variants":["regular"]},{"family":"Marvel","category":"sans-serif","variants":["regular","italic","700","700italic"]},{"family":"Cabin Sketch","category":"display","variants":["regular","700"]},{"family":"Hanuman","category":"serif","variants":["regular","700"]},{"family":"Cairo","category":"sans-serif","variants":["200","300","regular","600","700","900"]},{"family":"Chivo","category":"sans-serif","variants":["300","300italic","regular","italic","700","700italic","900","900italic"]},{"family":"Allerta","category":"sans-serif","variants":["regular"]},{"family":"Fugaz One","category":"display","variants":["regular"]},{"family":"Viga","category":"sans-serif","variants":["regular"]},{"family":"Ruslan Display","category":"display","variants":["regular"]},{"family":"Nixie One","category":"display","variants":["regular"]},{"family":"Marmelad","category":"sans-serif","variants":["regular"]},{"family":"Average","category":"serif","variants":["regular"]},{"family":"Spinnaker","category":"sans-serif","variants":["regular"]},{"family":"Leckerli One","category":"handwriting","variants":["regular"]},{"family":"Judson","category":"serif","variants":["regular","italic","700"]},{"family":"Lusitana","category":"serif","variants":["regular","700"]},{"family":"Montserrat Alternates","category":"sans-serif","variants":["100","100italic","200","200italic","300","300italic","regular","italic","500","500italic","600","600italic","700","700italic","800","800italic","900","900italic"]},{"family":"Contrail One","category":"display","variants":["regular"]},{"family":"Oranienbaum","category":"serif","variants":["regular"]},{"family":"Hind Vadodara","category":"sans-serif","variants":["300","regular","500","600","700"]},{"family":"Rufina","category":"serif","variants":["regular","700"]},{"family":"Quantico","category":"sans-serif","variants":["regular","italic","700","700italic"]},{"family":"Concert One","category":"display","variants":["regular"]},{"family":"Marcellus SC","category":"serif","variants":["regular"]},{"family":"Jockey One","category":"sans-serif","variants":["regular"]},{"family":"Parisienne","category":"handwriting","variants":["regular"]},{"family":"Carter One","category":"display","variants":["regular"]},{"family":"Arbutus Slab","category":"serif","variants":["regular"]},{"family":"Slabo 13px","category":"serif","variants":["regular"]},{"family":"Tauri","category":"sans-serif","variants":["regular"]},{"family":"Goudy Bookletter 1911","category":"serif","variants":["regular"]},{"family":"Carrois Gothic","category":"sans-serif","variants":["regular"]},{"family":"Sue Ellen Francisco","category":"handwriting","variants":["regular"]},{"family":"Walter Turncoat","category":"handwriting","variants":["regular"]},{"family":"Annie Use Your Telescope","category":"handwriting","variants":["regular"]},{"family":"Puritan","category":"sans-serif","variants":["regular","italic","700","700italic"]},{"family":"Grand Hotel","category":"handwriting","variants":["regular"]},{"family":"Yesteryear","category":"handwriting","variants":["regular"]},{"family":"Jaldi","category":"sans-serif","variants":["regular","700"]},{"family":"Khula","category":"sans-serif","variants":["300","regular","600","700","800"]},{"family":"Cinzel Decorative","category":"display","variants":["regular","700","900"]},{"family":"Crafty Girls","category":"handwriting","variants":["regular"]},{"family":"Merienda","category":"handwriting","variants":["regular","700"]},{"family":"Hind Guntur","category":"sans-serif","variants":["300","regular","500","600","700"]},{"family":"Cutive","category":"serif","variants":["regular"]},{"family":"Prompt","category":"sans-serif","variants":["100","100italic","200","200italic","300","300italic","regular","italic","500","500italic","600","600italic","700","700italic","800","800italic","900","900italic"]},{"family":"Coustard","category":"serif","variants":["regular","900"]},{"family":"Arima Madurai","category":"display","variants":["100","200","300","regular","500","700","800","900"]},{"family":"Doppio One","category":"sans-serif","variants":["regular"]},{"family":"Radley","category":"serif","variants":["regular","italic"]},{"family":"Fontdiner Swanky","category":"display","variants":["regular"]},{"family":"Iceland","category":"display","variants":["regular"]},{"family":"Alegreya SC","category":"serif","variants":["regular","italic","700","700italic","900","900italic"]},{"family":"Halant","category":"serif","variants":["300","regular","500","600","700"]},{"family":"Schoolbell","category":"handwriting","variants":["regular"]},{"family":"Waiting for the Sunrise","category":"handwriting","variants":["regular"]},{"family":"Italianno","category":"handwriting","variants":["regular"]},{"family":"Fredericka the Great","category":"display","variants":["regular"]},{"family":"Average Sans","category":"sans-serif","variants":["regular"]},{"family":"Rosario","category":"sans-serif","variants":["regular","italic","700","700italic"]},{"family":"Mr Dafoe","category":"handwriting","variants":["regular"]},{"family":"Port Lligat Slab","category":"serif","variants":["regular"]},{"family":"Aclonica","category":"sans-serif","variants":["regular"]},{"family":"Graduate","category":"display","variants":["regular"]},{"family":"Racing Sans One","category":"display","variants":["regular"]},{"family":"Berkshire Swash","category":"handwriting","variants":["regular"]},{"family":"Forum","category":"display","variants":["regular"]},{"family":"Anonymous Pro","category":"monospace","variants":["regular","italic","700","700italic"]},{"family":"Love Ya Like A Sister","category":"display","variants":["regular"]},{"family":"Nunito Sans","category":"sans-serif","variants":["200","200italic","300","300italic","regular","italic","600","600italic","700","700italic","800","800italic","900","900italic"]},{"family":"Magra","category":"sans-serif","variants":["regular","700"]},{"family":"Lateef","category":"handwriting","variants":["regular"]},{"family":"Assistant","category":"sans-serif","variants":["200","300","regular","600","700","800"]},{"family":"Six Caps","category":"sans-serif","variants":["regular"]},{"family":"Gilda Display","category":"serif","variants":["regular"]},{"family":"Oregano","category":"display","variants":["regular","italic"]},{"family":"Metrophobic","category":"sans-serif","variants":["regular"]},{"family":"Lalezar","category":"display","variants":["regular"]},{"family":"Caudex","category":"serif","variants":["regular","italic","700","700italic"]},{"family":"Kelly Slab","category":"display","variants":["regular"]},{"family":"Reem Kufi","category":"sans-serif","variants":["regular"]},{"family":"Cambay","category":"sans-serif","variants":["regular","italic","700","700italic"]},{"family":"Gruppo","category":"display","variants":["regular"]},{"family":"Give You Glory","category":"handwriting","variants":["regular"]},{"family":"GFS Didot","category":"serif","variants":["regular"]},{"family":"Duru Sans","category":"sans-serif","variants":["regular"]},{"family":"Andika","category":"sans-serif","variants":["regular"]},{"family":"Tenor Sans","category":"sans-serif","variants":["regular"]},{"family":"Knewave","category":"display","variants":["regular"]},{"family":"Averia Serif Libre","category":"display","variants":["300","300italic","regular","italic","700","700italic"]},{"family":"Eczar","category":"serif","variants":["regular","500","600","700","800"]},{"family":"Inder","category":"sans-serif","variants":["regular"]},{"family":"Martel Sans","category":"sans-serif","variants":["200","300","regular","600","700","800","900"]},{"family":"Trocchi","category":"serif","variants":["regular"]},{"family":"Wire One","category":"sans-serif","variants":["regular"]},{"family":"Petit Formal Script","category":"handwriting","variants":["regular"]},{"family":"Mako","category":"sans-serif","variants":["regular"]},{"family":"Frijole","category":"display","variants":["regular"]},{"family":"Zeyada","category":"handwriting","variants":["regular"]},{"family":"Slackey","category":"display","variants":["regular"]},{"family":"Karma","category":"serif","variants":["300","regular","500","600","700"]},{"family":"Mate","category":"serif","variants":["regular","italic"]},{"family":"Belleza","category":"sans-serif","variants":["regular"]},{"family":"Montez","category":"handwriting","variants":["regular"]},{"family":"Quando","category":"serif","variants":["regular"]},{"family":"Capriola","category":"sans-serif","variants":["regular"]},{"family":"Lilita One","category":"display","variants":["regular"]},{"family":"Trirong","category":"serif","variants":["100","100italic","200","200italic","300","300italic","regular","italic","500","500italic","600","600italic","700","700italic","800","800italic","900","900italic"]},{"family":"Lekton","category":"sans-serif","variants":["regular","italic","700"]},{"family":"Just Me Again Down Here","category":"handwriting","variants":["regular"]},{"family":"Bowlby One SC","category":"display","variants":["regular"]},{"family":"The Girl Next Door","category":"handwriting","variants":["regular"]},{"family":"Happy Monkey","category":"display","variants":["regular"]},{"family":"Merienda One","category":"handwriting","variants":["regular"]},{"family":"Alike","category":"serif","variants":["regular"]},{"family":"Chelsea Market","category":"display","variants":["regular"]},{"family":"Unkempt","category":"display","variants":["regular","700"]},{"family":"Anaheim","category":"sans-serif","variants":["regular"]},{"family":"Strait","category":"sans-serif","variants":["regular"]},{"family":"Brawler","category":"serif","variants":["regular"]},{"family":"Clicker Script","category":"handwriting","variants":["regular"]},{"family":"Delius","category":"handwriting","variants":["regular"]},{"family":"Mouse Memoirs","category":"sans-serif","variants":["regular"]},{"family":"IM Fell Double Pica","category":"serif","variants":["regular","italic"]},{"family":"Crushed","category":"display","variants":["regular"]},{"family":"Rammetto One","category":"display","variants":["regular"]},{"family":"Prosto One","category":"display","variants":["regular"]},{"family":"Kranky","category":"display","variants":["regular"]},{"family":"IM Fell English","category":"serif","variants":["regular","italic"]},{"family":"Aladin","category":"handwriting","variants":["regular"]},{"family":"Mr De Haviland","category":"handwriting","variants":["regular"]},{"family":"NTR","category":"sans-serif","variants":["regular"]},{"family":"Londrina Solid","category":"display","variants":["regular"]},{"family":"Skranji","category":"display","variants":["regular","700"]},{"family":"Allan","category":"display","variants":["regular","700"]},{"family":"Baumans","category":"display","variants":["regular"]},{"family":"Ovo","category":"serif","variants":["regular"]},{"family":"Changa","category":"sans-serif","variants":["200","300","regular","500","600","700","800"]},{"family":"Lemon","category":"display","variants":["regular"]},{"family":"Federo","category":"sans-serif","variants":["regular"]},{"family":"Herr Von Muellerhoff","category":"handwriting","variants":["regular"]},{"family":"Arizonia","category":"handwriting","variants":["regular"]},{"family":"Bowlby One","category":"display","variants":["regular"]},{"family":"Orienta","category":"sans-serif","variants":["regular"]},{"family":"Short Stack","category":"handwriting","variants":["regular"]},{"family":"Bungee Inline","category":"display","variants":["regular"]},{"family":"Andada","category":"serif","variants":["regular"]},{"family":"Baloo Paaji","category":"display","variants":["regular"]},{"family":"Oxygen Mono","category":"monospace","variants":["regular"]},{"family":"Yeseva One","category":"display","variants":["regular"]},{"family":"UnifrakturMaguntia","category":"display","variants":["regular"]},{"family":"Bentham","category":"serif","variants":["regular"]},{"family":"Londrina Outline","category":"display","variants":["regular"]},{"family":"Pompiere","category":"display","variants":["regular"]},{"family":"Gabriela","category":"serif","variants":["regular"]},{"family":"Qwigley","category":"handwriting","variants":["regular"]},{"family":"Nova Square","category":"display","variants":["regular"]},{"family":"Poly","category":"serif","variants":["regular","italic"]},{"family":"Sniglet","category":"display","variants":["regular","800"]},{"family":"Patrick Hand SC","category":"handwriting","variants":["regular"]},{"family":"Gravitas One","category":"display","variants":["regular"]},{"family":"Khmer","category":"display","variants":["regular"]},{"family":"Shojumaru","category":"display","variants":["regular"]},{"family":"Kurale","category":"serif","variants":["regular"]},{"family":"Gafata","category":"sans-serif","variants":["regular"]},{"family":"Biryani","category":"sans-serif","variants":["200","300","regular","600","700","800","900"]},{"family":"Cambo","category":"serif","variants":["regular"]},{"family":"Titan One","category":"display","variants":["regular"]},{"family":"Carrois Gothic SC","category":"sans-serif","variants":["regular"]},{"family":"La Belle Aurore","category":"handwriting","variants":["regular"]},{"family":"Holtwood One SC","category":"serif","variants":["regular"]},{"family":"Oleo Script Swash Caps","category":"display","variants":["regular","700"]},{"family":"Headland One","category":"serif","variants":["regular"]},{"family":"Cherry Swash","category":"display","variants":["regular","700"]},{"family":"Belgrano","category":"serif","variants":["regular"]},{"family":"Norican","category":"handwriting","variants":["regular"]},{"family":"Mountains of Christmas","category":"display","variants":["regular","700"]},{"family":"Julee","category":"handwriting","variants":["regular"]},{"family":"Ramabhadra","category":"sans-serif","variants":["regular"]},{"family":"Mallanna","category":"sans-serif","variants":["regular"]},{"family":"Kristi","category":"handwriting","variants":["regular"]},{"family":"Imprima","category":"sans-serif","variants":["regular"]},{"family":"Lily Script One","category":"display","variants":["regular"]},{"family":"Chau Philomene One","category":"sans-serif","variants":["regular","italic"]},{"family":"Bilbo Swash Caps","category":"handwriting","variants":["regular"]},{"family":"Finger Paint","category":"display","variants":["regular"]},{"family":"Voces","category":"display","variants":["regular"]},{"family":"Itim","category":"handwriting","variants":["regular"]},{"family":"Megrim","category":"display","variants":["regular"]},{"family":"Simonetta","category":"display","variants":["regular","italic","900","900italic"]},{"family":"Cutive Mono","category":"monospace","variants":["regular"]},{"family":"Stardos Stencil","category":"display","variants":["regular","700"]},{"family":"IM Fell DW Pica","category":"serif","variants":["regular","italic"]},{"family":"Unna","category":"serif","variants":["regular","italic","700","700italic"]},{"family":"Loved by the King","category":"handwriting","variants":["regular"]},{"family":"Prociono","category":"serif","variants":["regular"]},{"family":"Corben","category":"display","variants":["regular","700"]},{"family":"Amiko","category":"sans-serif","variants":["regular","600","700"]},{"family":"Denk One","category":"sans-serif","variants":["regular"]},{"family":"Palanquin","category":"sans-serif","variants":["100","200","300","regular","500","600","700"]},{"family":"Baloo","category":"display","variants":["regular"]},{"family":"Fondamento","category":"handwriting","variants":["regular","italic"]},{"family":"Seaweed Script","category":"display","variants":["regular"]},{"family":"Shanti","category":"sans-serif","variants":["regular"]},{"family":"Wendy One","category":"sans-serif","variants":["regular"]},{"family":"Raleway Dots","category":"display","variants":["regular"]},{"family":"Amethysta","category":"serif","variants":["regular"]},{"family":"Vast Shadow","category":"display","variants":["regular"]},{"family":"Stalemate","category":"handwriting","variants":["regular"]},{"family":"Fira Mono","category":"monospace","variants":["regular","500","700"]},{"family":"Expletus Sans","category":"display","variants":["regular","italic","500","500italic","600","600italic","700","700italic"]},{"family":"Scheherazade","category":"serif","variants":["regular","700"]},{"family":"Fenix","category":"serif","variants":["regular"]},{"family":"Delius Swash Caps","category":"handwriting","variants":["regular"]},{"family":"Rouge Script","category":"handwriting","variants":["regular"]},{"family":"Life Savers","category":"display","variants":["regular","700"]},{"family":"IM Fell English SC","category":"serif","variants":["regular"]},{"family":"Meddon","category":"handwriting","variants":["regular"]},{"family":"Tienne","category":"serif","variants":["regular","700","900"]},{"family":"Over the Rainbow","category":"handwriting","variants":["regular"]},{"family":"Share Tech Mono","category":"monospace","variants":["regular"]},{"family":"Abhaya Libre","category":"serif","variants":["regular","500","600","700","800"]},{"family":"Kotta One","category":"serif","variants":["regular"]},{"family":"Pridi","category":"serif","variants":["200","300","regular","500","600","700"]},{"family":"Euphoria Script","category":"handwriting","variants":["regular"]},{"family":"Engagement","category":"handwriting","variants":["regular"]},{"family":"Podkova","category":"serif","variants":["regular","500","600","700","800"]},{"family":"Salsa","category":"display","variants":["regular"]},{"family":"Sofia","category":"handwriting","variants":["regular"]},{"family":"Suranna","category":"serif","variants":["regular"]},{"family":"Mada","category":"sans-serif","variants":["300","regular","500","900"]},{"family":"Chonburi","category":"display","variants":["regular"]},{"family":"Ledger","category":"serif","variants":["regular"]},{"family":"Italiana","category":"serif","variants":["regular"]},{"family":"Dawning of a New Day","category":"handwriting","variants":["regular"]},{"family":"Nokora","category":"serif","variants":["regular","700"]},{"family":"Angkor","category":"display","variants":["regular"]},{"family":"Medula One","category":"display","variants":["regular"]},{"family":"Taviraj","category":"serif","variants":["100","100italic","200","200italic","300","300italic","regular","italic","500","500italic","600","600italic","700","700italic","800","800italic","900","900italic"]},{"family":"Vampiro One","category":"display","variants":["regular"]},{"family":"Englebert","category":"sans-serif","variants":["regular"]},{"family":"Nova Mono","category":"monospace","variants":["regular"]},{"family":"Dorsa","category":"sans-serif","variants":["regular"]},{"family":"Averia Sans Libre","category":"display","variants":["300","300italic","regular","italic","700","700italic"]},{"family":"Cedarville Cursive","category":"handwriting","variants":["regular"]},{"family":"Geo","category":"sans-serif","variants":["regular","italic"]},{"family":"Rationale","category":"sans-serif","variants":["regular"]},{"family":"Balthazar","category":"serif","variants":["regular"]},{"family":"Sunshiney","category":"handwriting","variants":["regular"]},{"family":"Aguafina Script","category":"handwriting","variants":["regular"]},{"family":"Mystery Quest","category":"display","variants":["regular"]},{"family":"Fjord One","category":"serif","variants":["regular"]},{"family":"Fira Sans Extra Condensed","category":"sans-serif","variants":["100","100italic","200","200italic","300","300italic","regular","italic","500","500italic","600","600italic","700","700italic","800","800italic","900","900italic"]},{"family":"Kadwa","category":"serif","variants":["regular","700"]},{"family":"McLaren","category":"display","variants":["regular"]},{"family":"Rye","category":"display","variants":["regular"]},{"family":"Sail","category":"display","variants":["regular"]},{"family":"Athiti","category":"sans-serif","variants":["200","300","regular","500","600","700"]},{"family":"Rosarivo","category":"serif","variants":["regular","italic"]},{"family":"Kite One","category":"sans-serif","variants":["regular"]},{"family":"Odor Mean Chey","category":"display","variants":["regular"]},{"family":"Numans","category":"sans-serif","variants":["regular"]},{"family":"Artifika","category":"serif","variants":["regular"]},{"family":"Poller One","category":"display","variants":["regular"]},{"family":"Gurajada","category":"serif","variants":["regular"]},{"family":"Inika","category":"serif","variants":["regular","700"]},{"family":"Mandali","category":"sans-serif","variants":["regular"]},{"family":"Bungee Shade","category":"display","variants":["regular"]},{"family":"Suwannaphum","category":"display","variants":["regular"]},{"family":"Mate SC","category":"serif","variants":["regular"]},{"family":"Creepster","category":"display","variants":["regular"]},{"family":"Arsenal","category":"sans-serif","variants":["regular","italic","700","700italic"]},{"family":"Montserrat Subrayada","category":"sans-serif","variants":["regular","700"]},{"family":"Metamorphous","category":"display","variants":["regular"]},{"family":"Palanquin Dark","category":"sans-serif","variants":["regular","500","600","700"]},{"family":"Coda Caption","category":"sans-serif","variants":["800"]},{"family":"Dynalight","category":"display","variants":["regular"]},{"family":"Maitree","category":"serif","variants":["200","300","regular","500","600","700"]},{"family":"IM Fell French Canon","category":"serif","variants":["regular","italic"]},{"family":"Amarante","category":"display","variants":["regular"]},{"family":"Quintessential","category":"handwriting","variants":["regular"]},{"family":"Codystar","category":"display","variants":["300","regular"]},{"family":"Cantora One","category":"sans-serif","variants":["regular"]},{"family":"Aref Ruqaa","category":"serif","variants":["regular","700"]},{"family":"Griffy","category":"display","variants":["regular"]},{"family":"Revalia","category":"display","variants":["regular"]},{"family":"Buenard","category":"serif","variants":["regular","700"]},{"family":"Donegal One","category":"serif","variants":["regular"]},{"family":"IM Fell DW Pica SC","category":"serif","variants":["regular"]},{"family":"Habibi","category":"serif","variants":["regular"]},{"family":"Share Tech","category":"sans-serif","variants":["regular"]},{"family":"Flamenco","category":"display","variants":["300","regular"]},{"family":"Mitr","category":"sans-serif","variants":["200","300","regular","500","600","700"]},{"family":"Maiden Orange","category":"display","variants":["regular"]},{"family":"Diplomata SC","category":"display","variants":["regular"]},{"family":"Cormorant","category":"serif","variants":["300","300italic","regular","italic","500","500italic","600","600italic","700","700italic"]},{"family":"Delius Unicase","category":"handwriting","variants":["regular","700"]},{"family":"Stoke","category":"serif","variants":["300","regular"]},{"family":"Vibur","category":"handwriting","variants":["regular"]},{"family":"Sarpanch","category":"sans-serif","variants":["regular","500","600","700","800","900"]},{"family":"Baloo Bhaina","category":"display","variants":["regular"]},{"family":"Baloo Tamma","category":"display","variants":["regular"]},{"family":"Averia Libre","category":"display","variants":["300","300italic","regular","italic","700","700italic"]},{"family":"Esteban","category":"serif","variants":["regular"]},{"family":"Battambang","category":"display","variants":["regular","700"]},{"family":"Bokor","category":"display","variants":["regular"]},{"family":"Wallpoet","category":"display","variants":["regular"]},{"family":"IM Fell Great Primer","category":"serif","variants":["regular","italic"]},{"family":"Tulpen One","category":"display","variants":["regular"]},{"family":"Proza Libre","category":"sans-serif","variants":["regular","italic","500","500italic","600","600italic","700","700italic","800","800italic"]},{"family":"IM Fell French Canon SC","category":"serif","variants":["regular"]},{"family":"Vesper Libre","category":"serif","variants":["regular","500","700","900"]},{"family":"Rozha One","category":"serif","variants":["regular"]},{"family":"Sansita","category":"sans-serif","variants":["regular","italic","700","700italic","800","800italic","900","900italic"]},{"family":"Kavoon","category":"display","variants":["regular"]},{"family":"Della Respira","category":"serif","variants":["regular"]},{"family":"Milonga","category":"display","variants":["regular"]},{"family":"Condiment","category":"handwriting","variants":["regular"]},{"family":"Junge","category":"serif","variants":["regular"]},{"family":"New Rocker","category":"display","variants":["regular"]},{"family":"Chicle","category":"display","variants":["regular"]},{"family":"Mrs Saint Delafield","category":"handwriting","variants":["regular"]},{"family":"League Script","category":"handwriting","variants":["regular"]},{"family":"Miniver","category":"display","variants":["regular"]},{"family":"Galindo","category":"display","variants":["regular"]},{"family":"Moul","category":"display","variants":["regular"]},{"family":"Amatica SC","category":"display","variants":["regular","700"]},{"family":"Stint Ultra Expanded","category":"display","variants":["regular"]},{"family":"Yrsa","category":"serif","variants":["300","regular","500","600","700"]},{"family":"Stint Ultra Condensed","category":"display","variants":["regular"]},{"family":"Suez One","category":"serif","variants":["regular"]},{"family":"Text Me One","category":"sans-serif","variants":["regular"]},{"family":"Buda","category":"display","variants":["300"]},{"family":"Ruluko","category":"sans-serif","variants":["regular"]},{"family":"Sonsie One","category":"display","variants":["regular"]},{"family":"Krona One","category":"sans-serif","variants":["regular"]},{"family":"Elsie","category":"display","variants":["regular","900"]},{"family":"Pangolin","category":"handwriting","variants":["regular"]},{"family":"Linden Hill","category":"serif","variants":["regular","italic"]},{"family":"Secular One","category":"sans-serif","variants":["regular"]},{"family":"IM Fell Double Pica SC","category":"serif","variants":["regular"]},{"family":"Alike Angular","category":"serif","variants":["regular"]},{"family":"Sancreek","category":"display","variants":["regular"]},{"family":"Bilbo","category":"handwriting","variants":["regular"]},{"family":"Antic Didone","category":"serif","variants":["regular"]},{"family":"Paprika","category":"display","variants":["regular"]},{"family":"Asul","category":"sans-serif","variants":["regular","700"]},{"family":"David Libre","category":"serif","variants":["regular","500","700"]},{"family":"Almendra","category":"serif","variants":["regular","italic","700","700italic"]},{"family":"Sriracha","category":"handwriting","variants":["regular"]},{"family":"Miriam Libre","category":"sans-serif","variants":["regular","700"]},{"family":"Ribeye","category":"display","variants":["regular"]},{"family":"Swanky and Moo Moo","category":"handwriting","variants":["regular"]},{"family":"Trade Winds","category":"display","variants":["regular"]},{"family":"Overlock SC","category":"display","variants":["regular"]},{"family":"Nova Round","category":"display","variants":["regular"]},{"family":"Cagliostro","category":"sans-serif","variants":["regular"]},{"family":"Glass Antiqua","category":"display","variants":["regular"]},{"family":"Offside","category":"display","variants":["regular"]},{"family":"El Messiri","category":"sans-serif","variants":["regular","500","600","700"]},{"family":"Bigshot One","category":"display","variants":["regular"]},{"family":"IM Fell Great Primer SC","category":"serif","variants":["regular"]},{"family":"Akronim","category":"display","variants":["regular"]},{"family":"Fira Sans Condensed","category":"sans-serif","variants":["100","100italic","200","200italic","300","300italic","regular","italic","500","500italic","600","600italic","700","700italic","800","800italic","900","900italic"]},{"family":"Nosifer","category":"display","variants":["regular"]},{"family":"Autour One","category":"display","variants":["regular"]},{"family":"Pirata One","category":"display","variants":["regular"]},{"family":"Port Lligat Sans","category":"sans-serif","variants":["regular"]},{"family":"Scope One","category":"serif","variants":["regular"]},{"family":"Sumana","category":"serif","variants":["regular","700"]},{"family":"Lemonada","category":"display","variants":["300","regular","600","700"]},{"family":"Montaga","category":"serif","variants":["regular"]},{"family":"Iceberg","category":"display","variants":["regular"]},{"family":"Ruthie","category":"handwriting","variants":["regular"]},{"family":"Content","category":"display","variants":["regular","700"]},{"family":"Henny Penny","category":"display","variants":["regular"]},{"family":"Nova Slim","category":"display","variants":["regular"]},{"family":"Hind Madurai","category":"sans-serif","variants":["300","regular","500","600","700"]},{"family":"Harmattan","category":"sans-serif","variants":["regular"]},{"family":"UnifrakturCook","category":"display","variants":["700"]},{"family":"Sarina","category":"display","variants":["regular"]},{"family":"Bubbler One","category":"sans-serif","variants":["regular"]},{"family":"Dekko","category":"handwriting","variants":["regular"]},{"family":"Redressed","category":"handwriting","variants":["regular"]},{"family":"Laila","category":"serif","variants":["300","regular","500","600","700"]},{"family":"Faster One","category":"display","variants":["regular"]},{"family":"Arya","category":"sans-serif","variants":["regular","700"]},{"family":"Peralta","category":"display","variants":["regular"]},{"family":"Meie Script","category":"handwriting","variants":["regular"]},{"family":"Overpass","category":"sans-serif","variants":["100","100italic","200","200italic","300","300italic","regular","italic","600","600italic","700","700italic","800","800italic","900","900italic"]},{"family":"Monsieur La Doulaise","category":"handwriting","variants":["regular"]},{"family":"Bungee","category":"display","variants":["regular"]},{"family":"Snippet","category":"sans-serif","variants":["regular"]},{"family":"Emilys Candy","category":"display","variants":["regular"]},{"family":"Trykker","category":"serif","variants":["regular"]},{"family":"MedievalSharp","category":"display","variants":["regular"]},{"family":"Space Mono","category":"monospace","variants":["regular","italic","700","700italic"]},{"family":"Croissant One","category":"display","variants":["regular"]},{"family":"Monofett","category":"display","variants":["regular"]},{"family":"Lovers Quarrel","category":"handwriting","variants":["regular"]},{"family":"Oldenburg","category":"display","variants":["regular"]},{"family":"Galdeano","category":"sans-serif","variants":["regular"]},{"family":"Spicy Rice","category":"display","variants":["regular"]},{"family":"Wellfleet","category":"display","variants":["regular"]},{"family":"Germania One","category":"display","variants":["regular"]},{"family":"GFS Neohellenic","category":"sans-serif","variants":["regular","italic","700","700italic"]},{"family":"Baloo Thambi","category":"display","variants":["regular"]},{"family":"Jolly Lodger","category":"display","variants":["regular"]},{"family":"Rubik Mono One","category":"sans-serif","variants":["regular"]},{"family":"Pattaya","category":"sans-serif","variants":["regular"]},{"family":"Joti One","category":"display","variants":["regular"]},{"family":"Siemreap","category":"display","variants":["regular"]},{"family":"Ranga","category":"display","variants":["regular","700"]},{"family":"Chango","category":"display","variants":["regular"]},{"family":"Miltonian Tattoo","category":"display","variants":["regular"]},{"family":"Koulen","category":"display","variants":["regular"]},{"family":"Eagle Lake","category":"handwriting","variants":["regular"]},{"family":"Nova Flat","category":"display","variants":["regular"]},{"family":"Petrona","category":"serif","variants":["regular"]},{"family":"Jacques Francois","category":"serif","variants":["regular"]},{"family":"Amita","category":"handwriting","variants":["regular","700"]},{"family":"Plaster","category":"display","variants":["regular"]},{"family":"Ramaraja","category":"serif","variants":["regular"]},{"family":"Sura","category":"serif","variants":["regular","700"]},{"family":"Kenia","category":"display","variants":["regular"]},{"family":"Fresca","category":"sans-serif","variants":["regular"]},{"family":"Jomhuria","category":"display","variants":["regular"]},{"family":"Lancelot","category":"display","variants":["regular"]},{"family":"Pavanam","category":"sans-serif","variants":["regular"]},{"family":"Rum Raisin","category":"sans-serif","variants":["regular"]},{"family":"Almendra SC","category":"serif","variants":["regular"]},{"family":"Purple Purse","category":"display","variants":["regular"]},{"family":"Kumar One","category":"display","variants":["regular"]},{"family":"Modern Antiqua","category":"display","variants":["regular"]},{"family":"Piedra","category":"display","variants":["regular"]},{"family":"Irish Grover","category":"display","variants":["regular"]},{"family":"Molle","category":"handwriting","variants":["italic"]},{"family":"Cormorant Infant","category":"serif","variants":["300","300italic","regular","italic","500","500italic","600","600italic","700","700italic"]},{"family":"Margarine","category":"display","variants":["regular"]},{"family":"Sahitya","category":"serif","variants":["regular","700"]},{"family":"Mukta Vaani","category":"sans-serif","variants":["200","300","regular","500","600","700","800"]},{"family":"Astloch","category":"display","variants":["regular","700"]},{"family":"Snowburst One","category":"display","variants":["regular"]},{"family":"Rhodium Libre","category":"serif","variants":["regular"]},{"family":"Smythe","category":"display","variants":["regular"]},{"family":"Asset","category":"display","variants":["regular"]},{"family":"Ewert","category":"display","variants":["regular"]},{"family":"Keania One","category":"display","variants":["regular"]},{"family":"Ranchers","category":"display","variants":["regular"]},{"family":"Gorditas","category":"display","variants":["regular","700"]},{"family":"Sirin Stencil","category":"display","variants":["regular"]},{"family":"Averia Gruesa Libre","category":"display","variants":["regular"]},{"family":"Trochut","category":"display","variants":["regular","italic","700"]},{"family":"Baloo Chettan","category":"display","variants":["regular"]},{"family":"Kdam Thmor","category":"display","variants":["regular"]},{"family":"Timmana","category":"sans-serif","variants":["regular"]},{"family":"Original Surfer","category":"display","variants":["regular"]},{"family":"Supermercado One","category":"display","variants":["regular"]},{"family":"Mirza","category":"display","variants":["regular","500","600","700"]},{"family":"Passero One","category":"display","variants":["regular"]},{"family":"Nova Oval","category":"display","variants":["regular"]},{"family":"Caesar Dressing","category":"display","variants":["regular"]},{"family":"Taprom","category":"display","variants":["regular"]},{"family":"Fascinate","category":"display","variants":["regular"]},{"family":"Seymour One","category":"sans-serif","variants":["regular"]},{"family":"Freehand","category":"display","variants":["regular"]},{"family":"Ravi Prakash","category":"display","variants":["regular"]},{"family":"Coiny","category":"display","variants":["regular"]},{"family":"Atomic Age","category":"display","variants":["regular"]},{"family":"Jacques Francois Shadow","category":"display","variants":["regular"]},{"family":"Diplomata","category":"display","variants":["regular"]},{"family":"Dr Sugiyama","category":"handwriting","variants":["regular"]},{"family":"Miltonian","category":"display","variants":["regular"]},{"family":"Ribeye Marrow","category":"display","variants":["regular"]},{"family":"Elsie Swash Caps","category":"display","variants":["regular","900"]},{"family":"Felipa","category":"handwriting","variants":["regular"]},{"family":"Galada","category":"display","variants":["regular"]},{"family":"Nova Script","category":"display","variants":["regular"]},{"family":"Bayon","category":"display","variants":["regular"]},{"family":"Underdog","category":"display","variants":["regular"]},{"family":"Devonshire","category":"handwriting","variants":["regular"]},{"family":"Atma","category":"display","variants":["300","regular","500","600","700"]},{"family":"Londrina Shadow","category":"display","variants":["regular"]},{"family":"Sofadi One","category":"display","variants":["regular"]},{"family":"Tillana","category":"handwriting","variants":["regular","500","600","700","800"]},{"family":"Inknut Antiqua","category":"serif","variants":["300","regular","500","600","700","800","900"]},{"family":"Goblin One","category":"display","variants":["regular"]},{"family":"Rakkas","category":"display","variants":["regular"]},{"family":"Metal","category":"display","variants":["regular"]},{"family":"Farsan","category":"display","variants":["regular"]},{"family":"Londrina Sketch","category":"display","variants":["regular"]},{"family":"Nova Cut","category":"display","variants":["regular"]},{"family":"BioRhyme","category":"serif","variants":["200","300","regular","700","800"]},{"family":"Warnes","category":"display","variants":["regular"]},{"family":"Romanesco","category":"handwriting","variants":["regular"]},{"family":"Fascinate Inline","category":"display","variants":["regular"]},{"family":"Mrs Sheppards","category":"handwriting","variants":["regular"]},{"family":"Princess Sofia","category":"handwriting","variants":["regular"]},{"family":"Modak","category":"display","variants":["regular"]},{"family":"Spirax","category":"display","variants":["regular"]},{"family":"Cormorant Upright","category":"serif","variants":["300","regular","500","600","700"]},{"family":"Geostar Fill","category":"display","variants":["regular"]},{"family":"Cormorant SC","category":"serif","variants":["300","regular","500","600","700"]},{"family":"Baloo Bhai","category":"display","variants":["regular"]},{"family":"Sree Krushnadevaraya","category":"serif","variants":["regular"]},{"family":"Smokum","category":"display","variants":["regular"]},{"family":"Arbutus","category":"display","variants":["regular"]},{"family":"Fruktur","category":"display","variants":["regular"]},{"family":"Geostar","category":"display","variants":["regular"]},{"family":"Marko One","category":"serif","variants":["regular"]},{"family":"Erica One","category":"display","variants":["regular"]},{"family":"Yatra One","category":"display","variants":["regular"]},{"family":"Uncial Antiqua","category":"display","variants":["regular"]},{"family":"Combo","category":"display","variants":["regular"]},{"family":"Gidugu","category":"sans-serif","variants":["regular"]},{"family":"Aubrey","category":"display","variants":["regular"]},{"family":"Jim Nightshade","category":"handwriting","variants":["regular"]},{"family":"Butterfly Kids","category":"handwriting","variants":["regular"]},{"family":"Metal Mania","category":"display","variants":["regular"]},{"family":"Macondo","category":"display","variants":["regular"]},{"family":"Chenla","category":"display","variants":["regular"]},{"family":"Miss Fajardose","category":"handwriting","variants":["regular"]},{"family":"Macondo Swash Caps","category":"display","variants":["regular"]},{"family":"Barrio","category":"display","variants":["regular"]},{"family":"Sevillana","category":"display","variants":["regular"]},{"family":"Bigelow Rules","category":"display","variants":["regular"]},{"family":"Rasa","category":"serif","variants":["300","regular","500","600","700"]},{"family":"Risque","category":"display","variants":["regular"]},{"family":"Federant","category":"display","variants":["regular"]},{"family":"Dangrek","category":"display","variants":["regular"]},{"family":"Chathura","category":"sans-serif","variants":["100","300","regular","700","800"]},{"family":"Almendra Display","category":"display","variants":["regular"]},{"family":"Chela One","category":"display","variants":["regular"]},{"family":"Bonbon","category":"handwriting","variants":["regular"]},{"family":"Stalinist One","category":"display","variants":["regular"]},{"family":"Mr Bedfort","category":"handwriting","variants":["regular"]},{"family":"Eater","category":"display","variants":["regular"]},{"family":"Fasthand","category":"serif","variants":["regular"]},{"family":"Mogra","category":"display","variants":["regular"]},{"family":"Padauk","category":"sans-serif","variants":["regular","700"]},{"family":"Preahvihear","category":"display","variants":["regular"]},{"family":"Flavors","category":"display","variants":["regular"]},{"family":"Ruge Boogie","category":"handwriting","variants":["regular"]},{"family":"Tenali Ramakrishna","category":"sans-serif","variants":["regular"]},{"family":"Unlock","category":"display","variants":["regular"]},{"family":"Butcherman","category":"display","variants":["regular"]},{"family":"Baloo Da","category":"display","variants":["regular"]},{"family":"Lakki Reddy","category":"handwriting","variants":["regular"]},{"family":"Cormorant Unicase","category":"serif","variants":["300","regular","500","600","700"]},{"family":"Katibeh","category":"display","variants":["regular"]},{"family":"Asar","category":"serif","variants":["regular"]},{"family":"Emblema One","category":"display","variants":["regular"]},{"family":"Moulpali","category":"display","variants":["regular"]},{"family":"Meera Inimai","category":"sans-serif","variants":["regular"]},{"family":"Kantumruy","category":"sans-serif","variants":["300","regular","700"]},{"family":"Suravaram","category":"serif","variants":["regular"]},{"family":"Bungee Hairline","category":"display","variants":["regular"]},{"family":"Overpass Mono","category":"monospace","variants":["300","regular","600","700"]},{"family":"Peddana","category":"serif","variants":["regular"]},{"family":"Bahiana","category":"display","variants":["regular"]},{"family":"Kumar One Outline","category":"display","variants":["regular"]},{"family":"Hanalei Fill","category":"display","variants":["regular"]},{"family":"Dhurjati","category":"sans-serif","variants":["regular"]},{"family":"Hanalei","category":"display","variants":["regular"]},{"family":"Kavivanar","category":"handwriting","variants":["regular"]},{"family":"Bungee Outline","category":"display","variants":["regular"]},{"family":"BioRhyme Expanded","category":"serif","variants":["200","300","regular","700","800"]}]' ); + + // Loop through them and put what we need into our fonts array. + $fonts = array(); + foreach ( $content as $item ) { + + // Grab what we need from our big list. + $atts = array( + 'name' => $item->family, + 'category' => $item->category, + 'variants' => $item->variants, + ); + + // Create an ID using our font family name. + $id = strtolower( str_replace( ' ', '_', $item->family ) ); + + // Add our attributes to our new array. + $fonts[ $id ] = $atts; + } + + if ( 'all' !== $amount ) { + $fonts = array_slice( $fonts, 0, $amount ); + } + + if ( apply_filters( 'generate_alphabetize_google_fonts', true ) ) { + asort( $fonts ); + } + + return apply_filters( 'generate_google_fonts_array', $fonts ); + } +} + +if ( ! function_exists( 'generate_get_all_google_fonts_ajax' ) ) { + add_action( 'wp_ajax_generate_get_all_google_fonts_ajax', 'generate_get_all_google_fonts_ajax' ); + /** + * Return an array of all of our Google Fonts. + * + * @since 1.3.0 + */ + function generate_get_all_google_fonts_ajax() { + if ( ! isset( $_POST['gp_customize_nonce'] ) || ! wp_verify_nonce( sanitize_key( $_POST['gp_customize_nonce'] ), 'gp_customize_nonce' ) ) { + wp_die(); + } + + check_ajax_referer( 'gp_customize_nonce', 'gp_customize_nonce' ); + + if ( ! current_user_can( 'edit_theme_options' ) ) { + wp_die(); + } + + $fonts = generate_get_all_google_fonts(); + + echo wp_json_encode( $fonts ); + + die(); + } +} + +if ( ! function_exists( 'generate_get_google_font_variants' ) ) { + /** + * Wrapper function to find variants for chosen Google Fonts + * Example: generate_get_google_font_variation( 'Open Sans' ) + * + * @since 1.3.0 + * + * @param string $font The font to look up. + * @param string $key The option to look up. + */ + function generate_get_google_font_variants( $font, $key = '' ) { + // Don't need variants if we're using a system font. + if ( in_array( $font, generate_typography_default_fonts() ) ) { + return; + } + + // Return if we have our variants saved. + if ( '' !== $key && get_theme_mod( $key . '_variants' ) ) { + return get_theme_mod( $key . '_variants' ); + } + + $defaults = generate_get_default_fonts(); + + if ( $defaults[ $key ] === $font ) { + return $defaults[ $key . '_variants' ]; + } + + // Grab all of our fonts. + // It's a big list, so hopefully we're not even still reading. + $fonts = generate_get_all_google_fonts(); + + // Get the ID from our font. + $id = strtolower( str_replace( ' ', '_', $font ) ); + + // If the ID doesn't exist within our fonts, we can bail. + if ( ! array_key_exists( $id, $fonts ) ) { + return; + } + + // Grab all of the variants associated with our font. + $variants = $fonts[ $id ]['variants']; + + // Loop through them and put them into an array, then turn them into a comma separated list. + $output = array(); + if ( $variants ) { + foreach ( $variants as $variant ) { + $output[] = $variant; + } + + return implode( ',', apply_filters( 'generate_typography_variants', $output ) ); + } + } +} + +if ( ! function_exists( 'generate_get_google_font_category' ) ) { + /** + * Wrapper function to find the category for chosen Google Font + * Example: generate_get_google_font_category( 'Open Sans' ) + * + * @since 1.3.0 + * + * @param string $font The name of our font. + * @param string $key The ID of the font setting. + * @return string The category of our font. + */ + function generate_get_google_font_category( $font, $key = '' ) { + // Don't need a category if we're using a system font. + if ( in_array( $font, generate_typography_default_fonts() ) ) { + return; + } + + // Return if we have our variants saved. + if ( '' !== $key && get_theme_mod( $key . '_category' ) ) { + return ', ' . get_theme_mod( $key . '_category' ); + } + + $defaults = generate_get_default_fonts(); + + // If our default font is selected and the category isn't saved, we already know the category. + if ( $defaults[ $key ] === $font ) { + return ', ' . $defaults[ $key . '_category' ]; + } + + // Grab all of our fonts. + // It's a big list, so hopefully we're not even still reading. + $fonts = generate_get_all_google_fonts(); + + // Get the ID from our font. + $id = strtolower( str_replace( ' ', '_', $font ) ); + + // If the ID doesn't exist within our fonts, we can bail. + if ( ! array_key_exists( $id, $fonts ) ) { + return; + } + + // Let's grab our category to go with our font. + $category = ! empty( $fonts[ $id ]['category'] ) ? ', ' . $fonts[ $id ]['category'] : ''; + + return $category; + } +} + + + +if ( ! function_exists( 'generate_get_font_family_css' ) ) { + /** + * Wrapper function to create font-family value for CSS. + * + * @since 1.3.0 + * + * @param string $font The name of our font. + * @param string $settings The ID of the settings we're looking up. + * @param array $default The defaults for our $settings. + * @return string The CSS value for our font family. + */ + function generate_get_font_family_css( $font, $settings, $default ) { + $generate_settings = wp_parse_args( + get_option( $settings, array() ), + $default + ); + + // We don't want to wrap quotes around these values. + $no_quotes = array( + 'inherit', + 'Arial, Helvetica, sans-serif', + 'Georgia, Times New Roman, Times, serif', + 'Helvetica', + 'Impact', + 'Segoe UI, Helvetica Neue, Helvetica, sans-serif', + 'Tahoma, Geneva, sans-serif', + 'Trebuchet MS, Helvetica, sans-serif', + 'Verdana, Geneva, sans-serif', + apply_filters( 'generate_typography_system_stack', '-apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"' ), + ); + + $font_family = $generate_settings[ $font ]; + + if ( 'System Stack' === $font_family ) { + $font_family = apply_filters( 'generate_typography_system_stack', '-apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"' ); + } + + // If our value is still using the old format, fix it. + if ( strpos( $font_family, ':' ) !== false ) { + $font_family = current( explode( ':', $font_family ) ); + } + + // Set up our wrapper. + if ( in_array( $font_family, $no_quotes ) ) { + $wrapper_start = null; + $wrapper_end = null; + } else { + $wrapper_start = '"'; + $wrapper_end = '"' . generate_get_google_font_category( $font_family, $font ); + } + + $output = ( 'inherit' === $font_family ) ? '' : $wrapper_start . $font_family . $wrapper_end; + + return $output; + } +} + +if ( ! function_exists( 'generate_add_to_font_customizer_list' ) ) { + add_filter( 'generate_typography_customize_list', 'generate_add_to_font_customizer_list' ); + /** + * This function makes sure your selected typography option exists in the Customizer list + * Why wouldn't it? Originally, all 800+ fonts were in each list. This has been reduced to 200. + * This functions makes sure that if you were using a font that is now not included in the 200, you won't lose it. + * + * @since 1.3.40 + * + * @param array $fonts The existing fonts. + */ + function generate_add_to_font_customizer_list( $fonts ) { + // Bail if we don't have our defaults. + if ( ! function_exists( 'generate_get_default_fonts' ) ) { + return; + } + + $generate_settings = wp_parse_args( + get_option( 'generate_settings', array() ), + generate_get_default_fonts() + ); + + $font_settings = array( + 'font_body', + 'font_top_bar', + 'font_site_title', + 'font_site_tagline', + 'font_navigation', + 'font_widget_title', + 'font_heading_1', + 'font_heading_2', + 'font_heading_3', + ); + + $all_fonts = generate_get_all_google_fonts(); + $select_fonts = generate_get_all_google_fonts( apply_filters( 'generate_number_of_fonts', 200 ) ); + + foreach ( $font_settings as $setting ) { + // If we don't have a setting, keep going. + if ( ! isset( $generate_settings[ $setting ] ) ) { + continue; + } + + $id = strtolower( str_replace( ' ', '_', $generate_settings[ $setting ] ) ); + + if ( array_key_exists( $id, $select_fonts ) || in_array( $generate_settings[ $setting ], generate_typography_default_fonts() ) ) { + continue; + } + + $fonts[ strtolower( str_replace( ' ', '_', $generate_settings[ $setting ] ) ) ] = array( + 'name' => $generate_settings[ $setting ], + 'variants' => array_key_exists( $id, $all_fonts ) ? $all_fonts[ $id ]['variants'] : array(), + 'category' => array_key_exists( $id, $all_fonts ) ? $all_fonts[ $id ]['category'] : 'sans-serif', + ); + } + + if ( function_exists( 'generate_secondary_nav_get_defaults' ) ) { + $secondary_nav_settings = wp_parse_args( + get_option( 'generate_secondary_nav_settings', array() ), + generate_secondary_nav_get_defaults() + ); + + $secondary_nav_id = strtolower( str_replace( ' ', '_', $secondary_nav_settings['font_secondary_navigation'] ) ); + + if ( ! array_key_exists( $secondary_nav_id, $select_fonts ) && ! in_array( $secondary_nav_settings['font_secondary_navigation'], generate_typography_default_fonts() ) ) { + $fonts[ strtolower( str_replace( ' ', '_', $secondary_nav_settings['font_secondary_navigation'] ) ) ] = array( + 'name' => $secondary_nav_settings['font_secondary_navigation'], + 'variants' => array_key_exists( $secondary_nav_id, $all_fonts ) ? $all_fonts[ $secondary_nav_id ]['variants'] : array(), + 'category' => array_key_exists( $secondary_nav_id, $all_fonts ) ? $all_fonts[ $secondary_nav_id ]['category'] : 'sans-serif', + ); + } + } + + return $fonts; + } +} + +if ( ! function_exists( 'generate_typography_set_font_data' ) ) { + add_action( 'admin_init', 'generate_typography_set_font_data' ); + /** + * This function will check to see if your category and variants are saved + * If not, it will set them for you + * Generally, set_theme_mod isn't best practice, but this is here for migration purposes for a set amount of time only + * Any time a user saves a font in the Customizer from now on, the category and variants are saved as theme_mods, so this function won't be necessary. + * + * @since 1.3.40 + */ + function generate_typography_set_font_data() { + // Get our defaults. + $defaults = generate_get_default_fonts(); + + // Get our settings. + $generate_settings = wp_parse_args( + get_option( 'generate_settings', array() ), + $defaults + ); + + // We don't need to do this if we're using the default font, as these values have defaults already. + if ( $defaults['font_body'] == $generate_settings['font_body'] ) { // phpcs:ignore + return; + } + + // Don't need to continue if we're using a system font or our default font. + if ( in_array( $generate_settings['font_body'], generate_typography_default_fonts() ) ) { + return; + } + + // Don't continue if our category and variants are already set. + if ( get_theme_mod( 'font_body_category' ) && get_theme_mod( 'font_body_variants' ) ) { + return; + } + + // Get all of our fonts. + $fonts = generate_get_all_google_fonts(); + + // Get the ID from our font. + $id = strtolower( str_replace( ' ', '_', $generate_settings['font_body'] ) ); + + // If the ID doesn't exist within our fonts, we can bail. + if ( ! array_key_exists( $id, $fonts ) ) { + return; + } + + // Let's grab our category to go with our font. + $category = ! empty( $fonts[ $id ]['category'] ) ? $fonts[ $id ]['category'] : ''; + + // Grab all of the variants associated with our font. + $variants = $fonts[ $id ]['variants']; + + // Loop through our variants and put them into an array, then turn them into a comma separated list. + $output = array(); + if ( $variants ) { + foreach ( $variants as $variant ) { + $output[] = $variant; + } + $variants = implode( ',', $output ); + } + + // Set our theme mods with our new settings. + if ( '' !== $category ) { + set_theme_mod( 'font_body_category', $category ); + } + + if ( '' !== $variants ) { + set_theme_mod( 'font_body_variants', $variants ); + } + } +} diff --git a/wp-content/themes/generatepress/index.php b/wp-content/themes/generatepress/index.php index 0a6a874e..2a40ea3d 100644 --- a/wp-content/themes/generatepress/index.php +++ b/wp-content/themes/generatepress/index.php @@ -1,75 +1,75 @@ - - -
    > -
    > - -
    -
    - - + +
    > +
    > + +
    +
    + + - -
    -
    - - -
    -

    -
    - - - -
    - - - -

    - Get started here.', 'generatepress' ), - esc_url( admin_url( 'post-new.php' ) ) - ); - ?> -

    - - - -

    - - - - -

    - - - - -
    - - -
    -
    + + +
    +
    + + +
    +

    +
    + + + +
    + + + +

    + Get started here.', 'generatepress' ), + esc_url( admin_url( 'post-new.php' ) ) + ); + ?> +

    + + + +

    + + + + +

    + + + + +
    + + +
    +
    diff --git a/wp-content/themes/generatepress/page.php b/wp-content/themes/generatepress/page.php index bbaef5a2..9ba0f9cc 100644 --- a/wp-content/themes/generatepress/page.php +++ b/wp-content/themes/generatepress/page.php @@ -1,59 +1,59 @@ - - -
    > -
    > - -
    -
    - - + +
    > +
    > + +
    +
    + + - -
    > -
    > - - - - - -
    -
    - - + +
    > +
    > + + + + + +
    +
    + + - + + diff --git a/wp-content/themes/generatepress/sidebar.php b/wp-content/themes/generatepress/sidebar.php index 12044a43..e2b90365 100644 --- a/wp-content/themes/generatepress/sidebar.php +++ b/wp-content/themes/generatepress/sidebar.php @@ -1,34 +1,34 @@ - - + + diff --git a/wp-content/themes/generatepress/single.php b/wp-content/themes/generatepress/single.php index 364806c3..79ebf6f5 100644 --- a/wp-content/themes/generatepress/single.php +++ b/wp-content/themes/generatepress/single.php @@ -1,54 +1,54 @@ - - -
    > -
    > - -
    -
    - - + +
    > +
    > + +
    +
    + +