From 1893733b642ce2a775abdf0f4823a175daebf99b Mon Sep 17 00:00:00 2001 From: "stephen@cubedesigners.com" Date: Thu, 17 Sep 2020 14:56:21 +0000 Subject: [PATCH] WIP #3678 @7 --- .../physioassist/src/WooCommerce/Setup.php | 6 ++++++ .../assets/styles/components/forms.styl | 10 ++++++++-- .../assets/styles/components/woocommerce.styl | 19 +++++++++++++++++++ 3 files changed, 33 insertions(+), 2 deletions(-) diff --git a/wp-content/mu-plugins/physioassist/src/WooCommerce/Setup.php b/wp-content/mu-plugins/physioassist/src/WooCommerce/Setup.php index a113b0cf..c8464639 100644 --- a/wp-content/mu-plugins/physioassist/src/WooCommerce/Setup.php +++ b/wp-content/mu-plugins/physioassist/src/WooCommerce/Setup.php @@ -26,10 +26,16 @@ class Setup { // Remove product count remove_action('woocommerce_before_shop_loop', 'woocommerce_result_count', 20); + // Remove product single page meta (Category) + remove_action('woocommerce_single_product_summary', 'woocommerce_template_single_meta', 40); + // Remove the H2 heading "Description" above the product description (it already has a tab heading) // This could also return a different heading text if desired // Ref: https://rudrastyh.com/woocommerce/rename-product-tabs-and-heading.html#change-description-heading add_filter('woocommerce_product_description_heading', '__return_false'); + + // Also disable the headings in custom tabs + add_filter('yikes_woocommerce_custom_repeatable_product_tabs_heading', '__return_false'); } public function woocommerce_cart_menu($menu, $args) { diff --git a/wp-content/themes/physioassist/resources/assets/styles/components/forms.styl b/wp-content/themes/physioassist/resources/assets/styles/components/forms.styl index 79706499..ecfd9f12 100644 --- a/wp-content/themes/physioassist/resources/assets/styles/components/forms.styl +++ b/wp-content/themes/physioassist/resources/assets/styles/components/forms.styl @@ -10,12 +10,12 @@ $border-color = $colors.text :-moz-placeholder /* Firefox 18- */ color: $placeholder-color -input, textarea +input, textarea, select font-size: 16px font-family: $font outline: none -input[type="text"], input[type="email"], input[type="number"], input[type="tel"] +input[type="text"], input[type="email"], input[type="number"], input[type="tel"], select appearance: none border: none padding: 0.5em 0 @@ -42,6 +42,12 @@ input[type="submit"] &:hover opacity: 0.85 +select + background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' x='0' y='0' viewBox='0 0 15 9' xml:space='preserve'%3E%3Cg fill='none' stroke='%237f8999' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M13.9 1.3L7.5 7.7'/%3E%3Cpath d='M1.1 1.3l6.4 6.4'/%3E%3C/g%3E%3C/svg%3E") center right no-repeat + background-size: 0.8em auto + &:invalid + color: $placeholder-color + // HTML Forms Plugin styling .hf-message margin: 2em 0 diff --git a/wp-content/themes/physioassist/resources/assets/styles/components/woocommerce.styl b/wp-content/themes/physioassist/resources/assets/styles/components/woocommerce.styl index f6a98e51..5158f076 100644 --- a/wp-content/themes/physioassist/resources/assets/styles/components/woocommerce.styl +++ b/wp-content/themes/physioassist/resources/assets/styles/components/woocommerce.styl @@ -120,6 +120,25 @@ p.price, span.price margin-bottom: 0.5em + div.images + .woocommerce-product-gallery__wrapper + line-height: 1 // So spacing between inline-block images is correct + + .woocommerce-product-gallery__image + + // All but first (large) image in gallery + &:nth-child(n+2) + display: inline-block + margin: 1em 1em 0 0 + width: calc(25% - 0.75em) // 4 columns with 3 gaps of 1em (ie. 3/4em off each for spacing) + + // Every 4th image, disable the right margin because it's the end of a row + &:nth-child(4n + 1) + margin-right: 0 + + img + display: inline-block + .woocommerce-product-details__short-description margin-bottom: 1.5em -- 2.39.5