From 9d4123cee1867ee7199b06bdc92d40611f547ecc Mon Sep 17 00:00:00 2001 From: Zach van Rijn Date: Wed, 21 Jul 2021 14:54:07 -0500 Subject: Initial unmodified import from Astra (Version: 3.6.5) @ /wp-content/themes/astra/. --- inc/dynamic-css/astra-icons.php | 84 +++++ inc/dynamic-css/block-editor-compatibility.php | 67 ++++ inc/dynamic-css/comments-flex.php | 405 ++++++++++++++++++++++ inc/dynamic-css/comments.php | 454 +++++++++++++++++++++++++ inc/dynamic-css/container-layouts.php | 128 +++++++ inc/dynamic-css/custom-menu-old-header.php | 194 +++++++++++ inc/dynamic-css/inline-on-mobile.php | 164 +++++++++ inc/dynamic-css/pagination.php | 189 ++++++++++ 8 files changed, 1685 insertions(+) create mode 100644 inc/dynamic-css/astra-icons.php create mode 100644 inc/dynamic-css/block-editor-compatibility.php create mode 100644 inc/dynamic-css/comments-flex.php create mode 100644 inc/dynamic-css/comments.php create mode 100644 inc/dynamic-css/container-layouts.php create mode 100644 inc/dynamic-css/custom-menu-old-header.php create mode 100644 inc/dynamic-css/inline-on-mobile.php create mode 100644 inc/dynamic-css/pagination.php (limited to 'inc/dynamic-css') diff --git a/inc/dynamic-css/astra-icons.php b/inc/dynamic-css/astra-icons.php new file mode 100644 index 0000000..6850da8 --- /dev/null +++ b/inc/dynamic-css/astra-icons.php @@ -0,0 +1,84 @@ + array( + 'font-size' => astra_get_font_css_value( (int) $body_font_size_desktop * 1.66666 ), + ), + // Single Post Meta. + '.ast-comment-meta' => array( + 'line-height' => '1.666666667', + 'color' => esc_attr( $link_color ), + 'font-size' => astra_get_font_css_value( (int) $body_font_size_desktop * 0.8571428571 ), + ), + '.ast-comment-list #cancel-comment-reply-link' => array( + 'font-size' => astra_responsive_font( $body_font_size, 'desktop' ), + ), + ); + $dynamic_css .= astra_parse_css( $desktop_comment_global ); + + $single_post_comment_css = '.comments-title { + padding: 2em 0; + } + + .comments-title { + font-weight: normal; + word-wrap: break-word; + } + + .ast-comment-list { + margin: 0; + word-wrap: break-word; + padding-bottom: 0.5em; + list-style: none; + } + + .ast-comment-list li { + list-style: none; + } + + .ast-comment-list .ast-comment-edit-reply-wrap { + -js-display: flex; + display: flex; + justify-content: flex-end; + } + + .ast-comment-list .ast-edit-link { + flex: 1; + } + + .ast-comment-list .comment-awaiting-moderation { + margin-bottom: 0; + } + + .ast-comment { + padding: 1em 0; + } + .ast-comment-info img { + border-radius: 50%; + } + .ast-comment-cite-wrap cite { + font-style: normal; + } + + .comment-reply-title { + padding-top: 1em; + font-weight: normal; + line-height: 1.65; + } + + .ast-comment-meta { + margin-bottom: 0.5em; + } + + .comments-area { + border-top: 1px solid #eeeeee; + margin-top: 2em; + } + + .comments-area .comment-form-comment { + width: 100%; + border: none; + margin: 0; + padding: 0; + } + .comments-area .comment-notes, + .comments-area .comment-textarea, + .comments-area .form-allowed-tags { + margin-bottom: 1.5em; + } + .comments-area .form-submit { + margin-bottom: 0; + } + .comments-area textarea#comment, + .comments-area .ast-comment-formwrap input[type="text"] { + width: 100%; + border-radius: 0; + vertical-align: middle; + margin-bottom: 10px; + } + .comments-area .no-comments { + margin-top: 0.5em; + margin-bottom: 0.5em; + } + .comments-area p.logged-in-as { + margin-bottom: 1em; + } + .ast-separate-container .comments-title { + background-color: #fff; + padding: 1.2em 3.99em 0; + } + .ast-separate-container .comments-area { + border-top: 0; + } + .ast-separate-container .ast-comment-list { + padding-bottom: 0; + } + .ast-separate-container .ast-comment-list li { + background-color: #fff; + } + .ast-separate-container .ast-comment-list li.depth-1 { + padding: 4em 6.67em; + margin-bottom: 2em; + } + @media (max-width: 1200px) { + .ast-separate-container .ast-comment-list li.depth-1 { + padding: 3em 3.34em; + } + } + + .ast-separate-container .ast-comment-list li.depth-1 .children li { + padding-bottom: 0; + padding-top: 0; + margin-bottom: 0; + } + + .ast-separate-container .ast-comment-list li.depth-1 .ast-comment, + .ast-separate-container .ast-comment-list li.depth-2 .ast-comment { + border-bottom: 0; + } + + .ast-separate-container .ast-comment-list .comment-respond { + padding-top: 0; + padding-bottom: 1em; + background-color: transparent; + } + + .ast-separate-container .ast-comment-list .pingback p { + margin-bottom: 0; + } + + .ast-separate-container .ast-comment-list .bypostauthor { + padding: 2em; + margin-bottom: 1em; + } + + .ast-separate-container .ast-comment-list .bypostauthor li { + background: transparent; + margin-bottom: 0; + padding: 0 0 0 2em; + } + + .ast-separate-container .comment-respond { + background-color: #fff; + padding: 4em 6.67em; + border-bottom: 0; + } + + @media (max-width: 1200px) { + .ast-separate-container .comment-respond { + padding: 3em 2.34em; + } + } + + .ast-separate-container .comment-reply-title { + padding-top: 0; + } + .comment-content a { + word-wrap: break-word; + }'; + if ( 'page-builder' == astra_get_content_layout() || 'plain-container' == astra_get_content_layout() ) { + $single_post_comment_css .= ' + .ast-comment-list li.depth-1 .ast-comment, + .ast-comment-list li.depth-2 .ast-comment { + border-bottom: 1px solid #eeeeee; + }'; + } + if ( $is_site_rtl ) { + $single_post_comment_css .= ' + .ast-comment-list .children { + margin-right: 2em; + } + + @media (max-width: 992px) { + .ast-comment-list .children { + margin-right: 1em; + } + } + + .ast-comment-list #cancel-comment-reply-link { + white-space: nowrap; + font-size: 15px; + font-size: 1rem; + margin-right: 1em; + } + + .ast-comment-meta { + justify-content: left; + padding: 0 3.4em 1.333em; + } + + .ast-comment-time .timendate, + .ast-comment-time .reply { + margin-left: 0.5em; + } + .comments-area #wp-comment-cookies-consent { + margin-left: 10px; + } + .ast-page-builder-template .comments-area { + padding-right: 20px; + padding-left: 20px; + margin-top: 0; + margin-bottom: 2em; + } + .ast-separate-container .ast-comment-list .bypostauthor .bypostauthor { + background: transparent; + margin-bottom: 0; + padding-left: 0; + padding-bottom: 0; + padding-top: 0; + }'; + } else { + $single_post_comment_css .= ' + .ast-comment-list .children { + margin-left: 2em; + } + + @media (max-width: 992px) { + .ast-comment-list .children { + margin-left: 1em; + } + } + + .ast-comment-list #cancel-comment-reply-link { + white-space: nowrap; + font-size: 15px; + font-size: 1rem; + margin-left: 1em; + } + + .ast-comment-info { + display: flex; + position: relative; + } + .ast-comment-meta { + justify-content: right; + padding: 0 3.4em 1.60em; + } + .ast-comment-time .timendate{ + margin-right: 0.5em; + } + .comments-area #wp-comment-cookies-consent { + margin-right: 10px; + } + .ast-page-builder-template .comments-area { + padding-left: 20px; + padding-right: 20px; + margin-top: 0; + margin-bottom: 2em; + } + .ast-separate-container .ast-comment-list .bypostauthor .bypostauthor { + background: transparent; + margin-bottom: 0; + padding-right: 0; + padding-bottom: 0; + padding-top: 0; + }'; + } + + $dynamic_css .= Astra_Enqueue_Scripts::trim_css( $single_post_comment_css ); + + $static_layout_css_min_comment = array( + '.ast-separate-container .ast-comment-list li .comment-respond' => array( + 'padding-left' => '2.66666em', + 'padding-right' => '2.66666em', + ), + ); + + $dynamic_css .= astra_parse_css( $static_layout_css_min_comment, astra_get_tablet_breakpoint( '', '1' ) ); + $global_button_comment_mobile = array( + '.ast-separate-container .ast-comment-list li.depth-1' => array( + 'padding' => '1.5em 1em', + 'margin-bottom' => '1.5em', + ), + '.ast-separate-container .ast-comment-list .bypostauthor' => array( + 'padding' => '.5em', + ), + '.ast-separate-container .comment-respond' => array( + 'padding' => '1.5em 1em', + ), + // Single Post Meta. + '.ast-comment-meta' => array( + 'font-size' => ! empty( $body_font_size['mobile'] ) ? astra_get_font_css_value( (int) $body_font_size['mobile'] * 0.8571428571, 'px', 'mobile' ) : '', + ), + '.comment-reply-title' => array( + 'font-size' => ! empty( $body_font_size['mobile'] ) ? astra_get_font_css_value( (int) $body_font_size['mobile'] * 1.66666, 'px', 'mobile' ) : '', + ), + '.ast-comment-list #cancel-comment-reply-link' => array( + 'font-size' => astra_responsive_font( $body_font_size, 'mobile' ), + ), + '.ast-separate-container .ast-comment-list .bypostauthor li' => array( + 'padding' => '0 0 0 .5em', + ), + ); + + if ( $is_site_rtl ) { + $global_button_comment_mobile['.ast-comment-list .children'] = array( + 'margin-right' => '0.66666em', + ); + } else { + $global_button_comment_mobile['.ast-comment-list .children'] = array( + 'margin-left' => '0.66666em', + ); + } + + $dynamic_css .= astra_parse_css( $global_button_comment_mobile, '', astra_get_mobile_breakpoint() ); + + $global_button_comment_tablet = array( + '.ast-comment-avatar-wrap img' => array( + 'max-width' => '2.5em', + ), + '.comments-area' => array( + 'margin-top' => '1.5em', + ), + '.ast-separate-container .comments-title' => array( + 'padding' => '1.43em 1.48em', + ), + '.ast-comment-meta' => array( + 'padding' => '0 1.8888em 1.3333em', + 'font-size' => ! empty( $body_font_size['tablet'] ) ? astra_get_font_css_value( (int) $body_font_size['tablet'] * 0.8571428571, 'px', 'tablet' ) : '', + ), + '.ast-separate-container .ast-comment-list li.depth-1' => array( + 'padding' => '1.5em 2.14em', + ), + '.ast-separate-container .comment-respond' => array( + 'padding' => '2em 2.14em', + ), + '.comment-reply-title' => array( + 'font-size' => ! empty( $body_font_size['tablet'] ) ? astra_get_font_css_value( (int) $body_font_size['tablet'] * 1.66666, 'px', 'tablet' ) : '', + ), + '.ast-comment-list #cancel-comment-reply-link' => array( + 'font-size' => astra_responsive_font( $body_font_size, 'tablet' ), + ), + '.ast-comment-meta' => array( + 'padding' => '0 1.8888em 1.3333em', + ), + ); + + if ( $is_site_rtl ) { + $global_button_comment_tablet['.ast-comment-avatar-wrap'] = array( + 'margin-left' => '0.5em', + ); + } else { + $global_button_comment_tablet['.ast-comment-avatar-wrap'] = array( + 'margin-right' => '0.5em', + ); + } + + return $dynamic_css .= astra_parse_css( $global_button_comment_tablet, '', astra_get_tablet_breakpoint() ); + } + return $dynamic_css; +} diff --git a/inc/dynamic-css/comments.php b/inc/dynamic-css/comments.php new file mode 100644 index 0000000..3c0e226 --- /dev/null +++ b/inc/dynamic-css/comments.php @@ -0,0 +1,454 @@ + array( + 'font-size' => astra_get_font_css_value( (int) $body_font_size_desktop * 1.66666 ), + ), + // Single Post Meta. + '.ast-comment-meta' => array( + 'line-height' => '1.666666667', + 'color' => esc_attr( $link_color ), + 'font-size' => astra_get_font_css_value( (int) $body_font_size_desktop * 0.8571428571 ), + ), + '.ast-comment-list #cancel-comment-reply-link' => array( + 'font-size' => astra_responsive_font( $body_font_size, 'desktop' ), + ), + ); + $dynamic_css .= astra_parse_css( $desktop_comment_global ); + + $single_post_comment_css = '.comments-count-wrapper { + padding: 2em 0; + } + + .comments-count-wrapper .comments-title { + font-weight: normal; + word-wrap: break-word; + } + + .ast-comment-list { + margin: 0; + word-wrap: break-word; + padding-bottom: 0.5em; + list-style: none; + } + + .ast-comment-list li { + list-style: none; + } + + .ast-comment-list li.depth-1 .ast-comment, + .ast-comment-list li.depth-2 .ast-comment { + border-bottom: 1px solid #eeeeee; + } + + .ast-comment-list .comment-respond { + padding: 1em 0; + border-bottom: 1px solid #eeeeee; + } + + .ast-comment-list .comment-respond .comment-reply-title { + margin-top: 0; + padding-top: 0; + } + + .ast-comment-list .comment-respond p { + margin-bottom: .5em; + } + + .ast-comment-list .ast-comment-edit-reply-wrap { + -js-display: flex; + display: flex; + justify-content: flex-end; + } + + .ast-comment-list .ast-edit-link { + flex: 1; + } + + .ast-comment-list .comment-awaiting-moderation { + margin-bottom: 0; + } + + .ast-comment { + padding: 1em 0; + } + .ast-comment-avatar-wrap img { + border-radius: 50%; + } + .ast-comment-content { + clear: both; + } + + .ast-comment-cite-wrap { + text-align: left; + } + + .ast-comment-cite-wrap cite { + font-style: normal; + } + + .comment-reply-title { + padding-top: 1em; + font-weight: normal; + line-height: 1.65; + } + + .ast-comment-meta { + margin-bottom: 0.5em; + } + .comments-area { + border-top: 1px solid #eeeeee; + margin-top: 2em; + } + + .comments-area .comment-form-comment { + width: 100%; + border: none; + margin: 0; + padding: 0; + } + + .comments-area .comment-notes, + .comments-area .comment-textarea, + .comments-area .form-allowed-tags { + margin-bottom: 1.5em; + } + + .comments-area .form-submit { + margin-bottom: 0; + } + + .comments-area textarea#comment, + .comments-area .ast-comment-formwrap input[type="text"] { + width: 100%; + border-radius: 0; + vertical-align: middle; + margin-bottom: 10px; + } + .comments-area .no-comments { + margin-top: 0.5em; + margin-bottom: 0.5em; + } + .comments-area p.logged-in-as { + margin-bottom: 1em; + } + .ast-separate-container .comments-count-wrapper { + background-color: #fff; + padding: 2em 6.67em 0; + } + + @media (max-width: 1200px) { + .ast-separate-container .comments-count-wrapper { + padding: 2em 3.34em; + } + } + + .ast-separate-container .comments-area { + border-top: 0; + } + + .ast-separate-container .ast-comment-list { + padding-bottom: 0; + } + + .ast-separate-container .ast-comment-list li { + background-color: #fff; + } + + .ast-separate-container .ast-comment-list li.depth-1 { + padding: 4em 6.67em; + margin-bottom: 2em; + } + + @media (max-width: 1200px) { + .ast-separate-container .ast-comment-list li.depth-1 { + padding: 3em 3.34em; + } + } + + .ast-separate-container .ast-comment-list li.depth-1 .children li { + padding-bottom: 0; + padding-top: 0; + margin-bottom: 0; + } + + .ast-separate-container .ast-comment-list li.depth-1 .ast-comment, + .ast-separate-container .ast-comment-list li.depth-2 .ast-comment { + border-bottom: 0; + } + + .ast-separate-container .ast-comment-list .comment-respond { + padding-top: 0; + padding-bottom: 1em; + background-color: transparent; + } + + .ast-separate-container .ast-comment-list .pingback p { + margin-bottom: 0; + } + + .ast-separate-container .ast-comment-list .bypostauthor { + padding: 2em; + margin-bottom: 1em; + } + + .ast-separate-container .ast-comment-list .bypostauthor li { + background: transparent; + margin-bottom: 0; + padding: 0 0 0 2em; + } + + .ast-separate-container .comment-respond { + background-color: #fff; + padding: 4em 6.67em; + border-bottom: 0; + } + + @media (max-width: 1200px) { + .ast-separate-container .comment-respond { + padding: 3em 2.34em; + } + } + + .ast-separate-container .comment-reply-title { + padding-top: 0; + } + + .comment-content a { + word-wrap: break-word; + }'; + + if ( $is_site_rtl ) { + $single_post_comment_css .= ' + .ast-comment-list .children { + margin-right: 2em; + } + + @media (max-width: 992px) { + .ast-comment-list .children { + margin-right: 1em; + } + } + + .ast-comment-list #cancel-comment-reply-link { + white-space: nowrap; + font-size: 15px; + font-size: 1rem; + margin-right: 1em; + } + + .ast-comment-avatar-wrap { + float: right; + clear: left; + margin-left: 1.33333em; + } + .ast-comment-meta-wrap { + float: right; + clear: left; + padding: 0 0 1.33333em; + } + .ast-comment-time .timendate, + .ast-comment-time .reply { + margin-left: 0.5em; + } + .comments-area #wp-comment-cookies-consent { + margin-left: 10px; + } + .ast-page-builder-template .comments-area { + padding-right: 20px; + padding-left: 20px; + margin-top: 0; + margin-bottom: 2em; + } + .ast-separate-container .ast-comment-list .bypostauthor .bypostauthor { + background: transparent; + margin-bottom: 0; + padding-left: 0; + padding-bottom: 0; + padding-top: 0; + }'; + } else { + $single_post_comment_css .= ' + .ast-comment-list .children { + margin-left: 2em; + } + + @media (max-width: 992px) { + .ast-comment-list .children { + margin-left: 1em; + } + } + + .ast-comment-list #cancel-comment-reply-link { + white-space: nowrap; + font-size: 15px; + font-size: 1rem; + margin-left: 1em; + } + + .ast-comment-avatar-wrap { + float: left; + clear: right; + margin-right: 1.33333em; + } + .ast-comment-meta-wrap { + float: left; + clear: right; + padding: 0 0 1.33333em; + } + .ast-comment-time .timendate, + .ast-comment-time .reply { + margin-right: 0.5em; + } + .comments-area #wp-comment-cookies-consent { + margin-right: 10px; + } + .ast-page-builder-template .comments-area { + padding-left: 20px; + padding-right: 20px; + margin-top: 0; + margin-bottom: 2em; + } + .ast-separate-container .ast-comment-list .bypostauthor .bypostauthor { + background: transparent; + margin-bottom: 0; + padding-right: 0; + padding-bottom: 0; + padding-top: 0; + }'; + } + + $dynamic_css .= Astra_Enqueue_Scripts::trim_css( $single_post_comment_css ); + + $static_layout_css_min_comment = array( + '.ast-separate-container .ast-comment-list li .comment-respond' => array( + 'padding-left' => '2.66666em', + 'padding-right' => '2.66666em', + ), + ); + $dynamic_css .= astra_parse_css( $static_layout_css_min_comment, astra_get_tablet_breakpoint( '', '1' ) ); + + $global_button_comment_mobile = array( + '.ast-separate-container .comments-count-wrapper' => array( + 'padding' => '1.5em 1em', + ), + '.ast-separate-container .ast-comment-list li.depth-1' => array( + 'padding' => '1.5em 1em', + 'margin-bottom' => '1.5em', + ), + '.ast-separate-container .ast-comment-list .bypostauthor' => array( + 'padding' => '.5em', + ), + '.ast-separate-container .comment-respond' => array( + 'padding' => '1.5em 1em', + ), + // Single Post Meta. + '.ast-comment-meta' => array( + 'font-size' => ! empty( $body_font_size['mobile'] ) ? astra_get_font_css_value( (int) $body_font_size['mobile'] * 0.8571428571, 'px', 'mobile' ) : '', + ), + '.comment-reply-title' => array( + 'font-size' => ! empty( $body_font_size['mobile'] ) ? astra_get_font_css_value( (int) $body_font_size['mobile'] * 1.66666, 'px', 'mobile' ) : '', + ), + '.ast-comment-list #cancel-comment-reply-link' => array( + 'font-size' => astra_responsive_font( $body_font_size, 'mobile' ), + ), + '.ast-separate-container .ast-comment-list .bypostauthor li' => array( + 'padding' => '0 0 0 .5em', + ), + ); + + if ( $is_site_rtl ) { + $global_button_comment_mobile['.ast-comment-list .children'] = array( + 'margin-right' => '0.66666em', + ); + } else { + $global_button_comment_mobile['.ast-comment-list .children'] = array( + 'margin-left' => '0.66666em', + ); + } + + $dynamic_css .= astra_parse_css( $global_button_comment_mobile, '', astra_get_mobile_breakpoint() ); + + $global_button_comment_tablet = array( + '.ast-comment-avatar-wrap img' => array( + 'max-width' => '2.5em', + ), + '.comments-area' => array( + 'margin-top' => '1.5em', + ), + '.ast-separate-container .comments-count-wrapper' => array( + 'padding' => '2em 2.14em', + ), + '.ast-separate-container .ast-comment-list li.depth-1' => array( + 'padding' => '1.5em 2.14em', + ), + '.ast-separate-container .comment-respond' => array( + 'padding' => '2em 2.14em', + ), + // Single Post Meta. + '.ast-comment-meta' => array( + 'font-size' => ! empty( $body_font_size['tablet'] ) ? astra_get_font_css_value( (int) $body_font_size['tablet'] * 0.8571428571, 'px', 'tablet' ) : '', + ), + '.comment-reply-title' => array( + 'font-size' => ! empty( $body_font_size['tablet'] ) ? astra_get_font_css_value( (int) $body_font_size['tablet'] * 1.66666, 'px', 'tablet' ) : '', + ), + '.ast-comment-list #cancel-comment-reply-link' => array( + 'font-size' => astra_responsive_font( $body_font_size, 'tablet' ), + ), + + ); + + $dynamic_css .= astra_parse_css( $global_button_comment_tablet, '', astra_get_tablet_breakpoint() ); + + if ( $is_site_rtl ) { + $global_button_tablet_lang_direction_css = array( + '.ast-comment-avatar-wrap' => array( + 'margin-left' => '0.5em', + ), + ); + } else { + $global_button_tablet_lang_direction_css = array( + '.ast-comment-avatar-wrap' => array( + 'margin-right' => '0.5em', + ), + ); + } + return $dynamic_css .= astra_parse_css( $global_button_tablet_lang_direction_css, '', astra_get_tablet_breakpoint() ); + } + return $dynamic_css; +} diff --git a/inc/dynamic-css/container-layouts.php b/inc/dynamic-css/container-layouts.php new file mode 100644 index 0000000..82196fb --- /dev/null +++ b/inc/dynamic-css/container-layouts.php @@ -0,0 +1,128 @@ + .ast-container { + max-width: 100%; + padding: 0; + } + .ast-page-builder-template .site-content #primary { + padding: 0; + margin: 0; + } + .ast-page-builder-template .no-results { + text-align: center; + margin: 4em auto; + } + .ast-page-builder-template .ast-pagination { + padding: 2em; + } + + .ast-page-builder-template .entry-header.ast-no-title.ast-no-thumbnail { + margin-top: 0; + } + .ast-page-builder-template .entry-header.ast-header-without-markup { + margin-top: 0; + margin-bottom: 0; + } + + .ast-page-builder-template .entry-header.ast-no-title.ast-no-meta { + margin-bottom: 0; + } + .ast-page-builder-template.single .post-navigation { + padding-bottom: 2em; + } + .ast-page-builder-template.single-post .site-content > .ast-container { + max-width: 100%; + } + .ast-page-builder-template.single-post .site-content > .ast-container { + max-width: 100%; + }'; + + if ( is_rtl() ) { + + $page_container_css .= ' + .ast-page-builder-template .entry-header { + margin-top: 4em; + margin-right: auto; + margin-left: auto; + padding-right: 20px; + padding-left: 20px; + } + .ast-page-builder-template .ast-archive-description { + margin-top: 4em; + margin-right: auto; + margin-left: auto; + padding-right: 20px; + padding-left: 20px; + } + .ast-page-builder-template.ast-no-sidebar .entry-content .alignwide { + margin-right: 0; + margin-left: 0; + } + .single.ast-page-builder-template .entry-header { + padding-right: 20px; + padding-left: 20px; + } + .ast-page-builder-template.ast-no-sidebar .entry-content .alignwide { + margin-right: 0; + margin-left: 0; + }'; + + } else { + $page_container_css .= ' + .ast-page-builder-template .entry-header { + margin-top: 4em; + margin-left: auto; + margin-right: auto; + padding-left: 20px; + padding-right: 20px; + } + .ast-page-builder-template .ast-archive-description { + margin-top: 4em; + margin-left: auto; + margin-right: auto; + padding-left: 20px; + padding-right: 20px; + } + .ast-page-builder-template.ast-no-sidebar .entry-content .alignwide { + margin-left: 0; + margin-right: 0; + } + .single.ast-page-builder-template .entry-header { + padding-left: 20px; + padding-right: 20px; + } + .ast-page-builder-template.ast-no-sidebar .entry-content .alignwide { + margin-left: 0; + margin-right: 0; + }'; + } + return Astra_Enqueue_Scripts::trim_css( $page_container_css ); + } + return $page_container_css; +} diff --git a/inc/dynamic-css/custom-menu-old-header.php b/inc/dynamic-css/custom-menu-old-header.php new file mode 100644 index 0000000..7c4323f --- /dev/null +++ b/inc/dynamic-css/custom-menu-old-header.php @@ -0,0 +1,194 @@ + .ast-menu-toggle::before, + .ast-header-break-point .ast-mobile-header-wrap .ast-main-header-wrap .main-header-bar-navigation .inline-on-mobile .menu-item-has-children > .ast-menu-toggle::before, + .ast-header-break-point .ast-mobile-header-wrap .ast-below-header-wrap .main-header-bar-navigation .inline-on-mobile .menu-item-has-children > .ast-menu-toggle::before { + font-size: .6rem; + } + .ast-header-break-point .ast-mobile-header-wrap .ast-flex.inline-on-mobile { + flex-wrap: unset; + } + .ast-header-break-point .ast-mobile-header-wrap .ast-flex.inline-on-mobile .menu-item.ast-submenu-expanded > .sub-menu .menu-link { + padding: .1em 1em; + } + .ast-header-break-point .ast-mobile-header-wrap .ast-flex.inline-on-mobile .menu-item.ast-submenu-expanded > .sub-menu > .menu-item .ast-menu-toggle::before { + transform: rotate(-90deg); + } + .ast-header-break-point .ast-mobile-header-wrap .ast-flex.inline-on-mobile .menu-item.ast-submenu-expanded > .sub-menu > .menu-item.ast-submenu-expanded .ast-menu-toggle::before { + transform: rotate(-270deg); + } + .ast-header-break-point .ast-mobile-header-wrap .ast-flex.inline-on-mobile .menu-item > .sub-menu > .menu-item .menu-link:before { + content: none; + } + .ast-header-break-point .ast-mobile-header-wrap .ast-flex.inline-on-mobile { + flex-wrap: unset; + } + + .ast-header-break-point .ast-mobile-header-wrap .ast-flex.inline-on-mobile .menu-item.ast-submenu-expanded > .sub-menu .menu-link { + padding: .1em 1em; + } + .ast-header-break-point .ast-mobile-header-wrap .ast-flex.inline-on-mobile .menu-item.ast-submenu-expanded > .sub-menu > .menu-item .ast-menu-toggle::before { + transform: rotate(-90deg); + } + .ast-header-break-point .ast-mobile-header-wrap .ast-flex.inline-on-mobile .menu-item.ast-submenu-expanded > .sub-menu > .menu-item.ast-submenu-expanded .ast-menu-toggle::before { + transform: rotate(-270deg); + } + .ast-header-break-point .ast-mobile-header-wrap .ast-flex.inline-on-mobile .menu-item > .sub-menu > .menu-item .menu-link:before { + content: none; + } + .ast-header-break-point .inline-on-mobile .sub-menu { + width: 150px; + }'; + + if ( is_rtl() ) { + $inline_on_mobile_css .= ' + .ast-header-break-point .ast-mobile-header-wrap .ast-flex.inline-on-mobile .menu-item.menu-item-has-children { + margin-left: 10px; + } + .ast-header-break-point .ast-mobile-header-wrap .ast-flex.inline-on-mobile .menu-item.ast-submenu-expanded > .sub-menu { + display: block; + position: absolute; + left: auto; + right: 0; + } + .ast-header-break-point .ast-mobile-header-wrap .ast-flex.inline-on-mobile .menu-item.ast-submenu-expanded > .sub-menu .menu-item .ast-menu-toggle { + padding: 0; + left: 1em; + } + .ast-header-break-point .ast-mobile-header-wrap .ast-flex.inline-on-mobile .menu-item.ast-submenu-expanded > .sub-menu > .menu-item > .sub-menu { + right: 100%; + left: auto; + } + .ast-header-break-point .ast-mobile-header-wrap .ast-flex.inline-on-mobile .ast-menu-toggle { + left: -15px; + } + .ast-header-break-point .ast-mobile-header-wrap .ast-flex.inline-on-mobile .menu-item.menu-item-has-children { + margin-left: 10px; + } + + .ast-header-break-point .ast-mobile-header-wrap .ast-flex.inline-on-mobile .menu-item.ast-submenu-expanded > .sub-menu { + display: block; + position: absolute; + left: auto; + right: 0; + } + + .ast-header-break-point .ast-mobile-header-wrap .ast-flex.inline-on-mobile .menu-item.ast-submenu-expanded > .sub-menu > .menu-item > .sub-menu { + right: 100%; + left: auto; + } + .ast-header-break-point .ast-mobile-header-wrap .ast-flex.inline-on-mobile .ast-menu-toggle { + left: -15px; + }'; + } else { + $inline_on_mobile_css .= ' + .ast-header-break-point .ast-mobile-header-wrap .ast-flex.inline-on-mobile .menu-item.menu-item-has-children { + margin-right: 10px; + } + .ast-header-break-point .ast-mobile-header-wrap .ast-flex.inline-on-mobile .menu-item.ast-submenu-expanded > .sub-menu { + display: block; + position: absolute; + right: auto; + left: 0; + } + .ast-header-break-point .ast-mobile-header-wrap .ast-flex.inline-on-mobile .menu-item.ast-submenu-expanded > .sub-menu .menu-item .ast-menu-toggle { + padding: 0; + right: 1em; + } + .ast-header-break-point .ast-mobile-header-wrap .ast-flex.inline-on-mobile .menu-item.ast-submenu-expanded > .sub-menu > .menu-item > .sub-menu { + left: 100%; + right: auto; + } + .ast-header-break-point .ast-mobile-header-wrap .ast-flex.inline-on-mobile .ast-menu-toggle { + right: -15px; + } + .ast-header-break-point .ast-mobile-header-wrap .ast-flex.inline-on-mobile .menu-item.menu-item-has-children { + margin-right: 10px; + } + .ast-header-break-point .ast-mobile-header-wrap .ast-flex.inline-on-mobile .menu-item.ast-submenu-expanded > .sub-menu { + display: block; + position: absolute; + right: auto; + left: 0; + } + .ast-header-break-point .ast-mobile-header-wrap .ast-flex.inline-on-mobile .menu-item.ast-submenu-expanded > .sub-menu > .menu-item > .sub-menu { + left: 100%; + right: auto; + } + .ast-header-break-point .ast-mobile-header-wrap .ast-flex.inline-on-mobile .ast-menu-toggle { + right: -15px; + }'; + } + + return $dynamic_css .= Astra_Enqueue_Scripts::trim_css( $inline_on_mobile_css ); +} diff --git a/inc/dynamic-css/pagination.php b/inc/dynamic-css/pagination.php new file mode 100644 index 0000000..2a9d83a --- /dev/null +++ b/inc/dynamic-css/pagination.php @@ -0,0 +1,189 @@ + array( + 'display' => 'inherit', + 'float' => 'none', + ), + '.ast-pagination a' => array( + 'color' => esc_attr( $link_color ), + ), + '.ast-pagination a:hover, .ast-pagination a:focus, .ast-pagination > span:hover:not(.dots), .ast-pagination > span.current' => array( + 'color' => esc_attr( $link_hover_color ), + ), + ); + $dynamic_css .= astra_parse_css( $pagination_color_output ); + + $pagination_static_css = ' + .ast-pagination .prev.page-numbers, + .ast-pagination .next.page-numbers { + padding: 0 1.5em; + height: 2.33333em; + line-height: calc(2.33333em - 3px); + } + .ast-pagination { + display: inline-block; + width: 100%; + padding-top: 2em; + text-align: center; + } + .ast-pagination .page-numbers { + display: inline-block; + width: 2.33333em; + height: 2.33333em; + font-size: 16px; + font-size: 1.06666rem; + line-height: calc(2.33333em - 3px); + } + .ast-pagination .nav-links { + display: inline-block; + width: 100%; + } + @media (max-width: 420px) { + .ast-pagination .prev.page-numbers, + .ast-pagination .next.page-numbers { + width: 100%; + text-align: center; + margin: 0; + } + } + .ast-pagination .prev, + .ast-pagination .prev:visited, + .ast-pagination .prev:focus, + .ast-pagination .next, + .ast-pagination .next:visited, + .ast-pagination .next:focus { + display: inline-block; + width: auto; + } + .ast-page-builder-template .ast-pagination { + padding: 2em; + }'; + + if ( ! Astra_Builder_Helper::apply_flex_based_css() ) { + $pagination_static_css .= ' + .ast-pagination .prev.page-numbers.dots, .ast-pagination .prev.page-numbers.dots:hover, .ast-pagination .prev.page-numbers.dots:focus, + .ast-pagination .prev.page-numbers:visited.dots, + .ast-pagination .prev.page-numbers:visited.dots:hover, + .ast-pagination .prev.page-numbers:visited.dots:focus, + .ast-pagination .prev.page-numbers:focus.dots, + .ast-pagination .prev.page-numbers:focus.dots:hover, + .ast-pagination .prev.page-numbers:focus.dots:focus, + .ast-pagination .next.page-numbers.dots, + .ast-pagination .next.page-numbers.dots:hover, + .ast-pagination .next.page-numbers.dots:focus, + .ast-pagination .next.page-numbers:visited.dots, + .ast-pagination .next.page-numbers:visited.dots:hover, + .ast-pagination .next.page-numbers:visited.dots:focus, + .ast-pagination .next.page-numbers:focus.dots, + .ast-pagination .next.page-numbers:focus.dots:hover, + .ast-pagination .next.page-numbers:focus.dots:focus { + border: 2px solid #eaeaea; + background: transparent; + } + + .ast-pagination .prev.page-numbers.dots, + .ast-pagination .prev.page-numbers:visited.dots, + .ast-pagination .prev.page-numbers:focus.dots, + .ast-pagination .next.page-numbers.dots, + .ast-pagination .next.page-numbers:visited.dots, + .ast-pagination .next.page-numbers:focus.dots { + cursor: default; + }'; + } + + if ( is_rtl() ) { + $pagination_static_css .= ' + @media (min-width: 993px) { + .ast-pagination { + padding-right: 3.33333em; + padding-left: 3.33333em; + } + .ast-pagination .next.page-numbers { + float: left; + text-align: left; + } + @media (max-width: 768px) { + .ast-pagination .next.page-numbers .page-navigation { + padding-left: 0; + } + }'; + + if ( ! Astra_Builder_Helper::apply_flex_based_css() ) { + $pagination_static_css .= ' + @media (min-width: 769px) { + .ast-pagination .prev.page-numbers.next, + .ast-pagination .prev.page-numbers:visited.next, + .ast-pagination .prev.page-numbers:focus.next, + .ast-pagination .next.page-numbers.next, + .ast-pagination .next.page-numbers:visited.next, + .ast-pagination .next.page-numbers:focus.next { + margin-left: 0; + } + }'; + } + } else { + $pagination_static_css .= ' + @media (min-width: 993px) { + .ast-pagination { + padding-left: 3.33333em; + padding-right: 3.33333em; + } + } + .ast-pagination .next.page-numbers { + float: right; + } + + @media (max-width: 768px) { + .ast-pagination .next.page-numbers .page-navigation { + padding-right: 0; + } + }'; + + if ( ! Astra_Builder_Helper::apply_flex_based_css() ) { + $pagination_static_css .= ' + @media (min-width: 769px) { + .ast-pagination .prev.page-numbers.next, + .ast-pagination .prev.page-numbers:visited.next, + .ast-pagination .prev.page-numbers:focus.next, + .ast-pagination .next.page-numbers.next, + .ast-pagination .next.page-numbers:visited.next, + .ast-pagination .next.page-numbers:focus.next { + margin-right: 0; + } + }'; + } + } + return $dynamic_css .= Astra_Enqueue_Scripts::trim_css( $pagination_static_css ); + } + return $dynamic_css; + +} -- cgit v1.2.3-60-g2f50