Created
February 29, 2024 00:06
-
-
Save wpsoul/0398141f0718340d45bcdf99d199c38e to your computer and use it in GitHub Desktop.
Woocommerce grid with second image on hover for Greenshift Wordpress
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- wp:greenshift-blocks/querygrid {"id":"gsbp-172c291","inlineCssStyles":null,"itemSpacing":{"margin":{"values":[],"unit":["px","px","px","px"],"locked":false},"padding":{"values":{"top":["10px",null,null,0],"right":[null,null,null,0],"bottom":[null,null,null,0],"left":[null,null,null,0]},"unit":["px","px","px","px"],"locked":false},"overflow":["hidden"]},"border":{"borderRadius":{"values":{"topLeft":6,"topRight":6,"bottomRight":6,"bottomLeft":6},"unit":"px","locked":true},"style":{"all":["solid"]},"size":{"all":[1,null,null,1]},"color":{"all":["#7d7d7d2b",null,null,"#ffffff00"]},"styleHover":[],"sizeHover":[],"colorHover":[]},"data_source":"cpt","cat":[],"tag":[],"post_type":"product","tax_name":"","ids":[],"enable_pagination":"1","columnGrid":[4,3,2,2],"flexbox":{"type":"flexbox","flexDirection":["column"],"justifyContent":["flex-start"]}} --> | |
<!-- wp:greenshift-blocks/dynamicgallery {"id":"gsbp-224504c","dynamicGClasses":[{"value":"hoveredproductimage","type":"local","label":"hoveredproductimage","localed":false,"css":"","attributes":{},"originalID":"gsbp-78d6d25","originalBlock":"greenshift-blocks/dynamicgallery","selectors":[{"value":" img:nth-child(2)","attributes":{"position":{"positionType":["absolute","","",""],"positions":{"values":{"top":[null]}}},"csstransform":{"opacity":"0","hoverClass":".gspbgrid_item","opacityHover":"1","time":"0.5"}},"css":"body .hoveredproductimage img:nth-child(2){position:absolute;}body .hoveredproductimage img:nth-child(2){transition:all 0.5s cubic-bezier(0.165,0.84,0.44,1);opacity:0;}.gspbgrid_item:hover .hoveredproductimage img:nth-child(2){opacity:1;}"}]}],"image_size":"woocommerce_thumbnail","responsive":{"customcss":""},"dynamicField":"_product_image_gallery","post_type":"product","gridcolumn":[1,3,2,2],"columngap":["0px"],"rowgap":["0px"],"scale":"scale-down","customHeight":[250],"limit":2,"enableThumbnail":true,"className":"hoveredproductimage"} /--> | |
<!-- wp:greenshift-blocks/product-discount {"id":"gsbp-7975890d-0458","inlineCssStyles":null,"position":{"positionType":["absolute","","",""],"positions":{"values":{"top":["10px"],"left":["10px"]}}},"spacing":{"margin":{"values":[],"unit":["px","px","px","px"],"locked":false},"padding":{"values":{"right":[7],"left":[7],"bottom":[2],"top":[2]},"unit":["px","px","px","px"],"locked":false}},"border":{"borderRadius":{"values":{"topLeft":["15"],"topRight":["15"],"bottomRight":["15"],"bottomLeft":["15"]},"unit":"px","locked":true},"style":{"all":["solid"]},"size":{"all":[1]},"color":{"all":["#e2e8f3"]},"styleHover":[],"sizeHover":[],"colorHover":[]},"background":{"color":"#ffffff"},"typography":{"textShadow":[],"size":[12.8],"color":"#ff5a14"},"loading":false} /--> | |
<!-- wp:greenshift-blocks/container {"id":"gsbp-942bb088-c7dc","inlineCssStyles":null,"flexbox":{"type":"flexbox","flexDirection":["column"],"rowgap":[10]},"position":{"positionType":["absolute","","",""],"positions":{"values":{"top":["10px"],"right":["10px"]}}}} --> | |
<div class="wp-block-greenshift-blocks-container gspb_container gspb_container-gsbp-942bb088-c7dc" id="gspb_container-id-gsbp-942bb088-c7dc"><!-- wp:greenshift-blocks/product-quick-view {"id":"gsbp-b294b12d-8b7e","inlineCssStyles":null,"background":{"color":"#ffffff"},"spacing":{"margin":{"values":[],"unit":["px","px","px","px"],"locked":false},"padding":{"values":{"top":[12,null,null,9],"right":[12,null,null,9],"bottom":[12,null,null,9],"left":[12,null,null,9]},"unit":["px","px","px","px"],"locked":true}},"border":{"borderRadius":{"values":{"topLeft":[99],"topRight":[99],"bottomRight":[99],"bottomLeft":[99]},"unit":"px","locked":true},"style":[],"size":[],"color":[],"styleHover":[],"sizeHover":[],"colorHover":[]},"shadow":{"hoffset":0,"voffset":2,"blur":4,"spread":0,"color":"rgba(0, 0, 0, 0.07)","position":null},"iconBox_icon":{"icon":{"font":"rhicon rhi-search-plus","svg":"","image":""},"fill":"#747b8f","fillhover":"","type":"font","iconSize":[16,null,null,"14px"]}} --> | |
<div class="wp-block-greenshift-blocks-product-quick-view gspb-product-quick-view-box-button-wrapper gspb-product-quick-view-box-id-gsbp-b294b12d-8b7e" id="gspb-product-quick-view-box-id-gsbp-b294b12d-8b7e"><a class="gspb-product-quick-view-box-button" href="#"><span class="gspb-product-quick-view-box-button-textwrap"><span class="gspb-product-quick-view-box-button-icon"><svg class="" style="display:inline-block;vertical-align:middle" width="15" height="15" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path style="fill:#565D66" d="M639.6 408v16c0 13.2-10.8 24-24 24h-168v168c0 13.2-10.8 24-24 24h-16c-13.2 0-24-10.8-24-24v-168h-168c-13.2 0-24-10.8-24-24v-16c0-13.2 10.8-24 24-24h168v-168c0-13.2 10.8-24 24-24h16c13.2 0 24 10.8 24 24v168h168c13.2 0 24 10.8 24 24zM1016.6 994l-22.6 22.6c-9.4 9.4-24.6 9.4-34 0l-258-258c-4.6-4.6-7-10.6-7-17v-17c-73.8 66.8-171.6 107.4-279 107.4-228.4 0-413-182.2-416-410.6-3-234 187.4-424.4 421.4-421.4 228.4 3 410.6 187.6 410.6 416 0 107.4-40.6 205.2-107.4 279h17c6.4 0 12.4 2.6 17 7l258 258c9.4 9.4 9.4 24.6 0 34zM768 416c0-194.6-157.4-352-352-352s-352 157.4-352 352 157.4 352 352 352 352-157.4 352-352z"></path></svg></span><span class="gspb-product-quick-view-box-button-text"><span class="gspb-product-quick-view-box-button-title"></span></span></span></a></div> | |
<!-- /wp:greenshift-blocks/product-quick-view --> | |
<!-- wp:greenshift-blocks/product-comparison {"id":"gsbp-6b267025-3fce","inlineCssStyles":null,"spacing":{"margin":{"values":[],"unit":["px","px","px","px"],"locked":false},"padding":{"values":{"top":[11,null,null,9],"right":[11,null,null,9],"bottom":[11,null,null,9],"left":[11,null,null,9]},"unit":["px","px","px","px"],"locked":true}},"shadow":{"hoffset":0,"voffset":2,"blur":4,"spread":0,"color":"rgba(0, 0, 0, 0.07)","position":null},"border":{"borderRadius":{"values":{"topLeft":["99"],"topRight":["99"],"bottomRight":["99"],"bottomLeft":["99"]},"unit":"px","locked":true},"style":[],"size":[],"color":[],"styleHover":[],"sizeHover":[],"colorHover":[]},"background":{"color":"#ffffff"},"iconSpacing":{"margin":{"values":{"right":["0px"]},"locked":false},"padding":{"values":[],"locked":false}},"comparisonadd":"","comparisonadded":"","disableCounter":true,"iconBox_icon":{"icon":{"font":"rhicon rhi-shuffle","svg":"","image":""},"fill":"#747b8f","fillhover":"","type":"font","iconSize":[16,null,null,"14px"]}} --> | |
<span class="compareicon"><svg class="" style="display:inline-block;vertical-align:middle" width="16" height="16" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path style="fill:#565D66" d="M200.832 883.499l652.501-652.501v110.336c0 23.552 19.115 42.667 42.667 42.667s42.667-19.115 42.667-42.667v-213.333c0-5.803-1.152-11.307-3.243-16.341s-5.163-9.728-9.216-13.781c-0.043-0.043-0.043-0.043-0.085-0.085-3.925-3.925-8.619-7.083-13.781-9.216-5.035-2.091-10.539-3.243-16.341-3.243h-213.333c-23.552 0-42.667 19.115-42.667 42.667s19.115 42.667 42.667 42.667h110.336l-652.501 652.501c-16.683 16.683-16.683 43.691 0 60.331s43.691 16.683 60.331 0zM609.835 670.165l183.168 183.168h-110.336c-23.552 0-42.667 19.115-42.667 42.667s19.115 42.667 42.667 42.667h213.333c5.547 0 11.136-1.067 16.341-3.243s9.899-5.333 13.824-9.259c4.096-4.096 7.168-8.789 9.259-13.824s3.243-10.539 3.243-16.341v-213.333c0-23.552-19.115-42.667-42.667-42.667s-42.667 19.115-42.667 42.667v110.336l-183.168-183.168c-16.683-16.683-43.691-16.683-60.331 0s-16.683 43.691 0 60.331zM140.501 200.832l213.333 213.333c16.683 16.683 43.691 16.683 60.331 0s16.683-43.691 0-60.331l-213.333-213.333c-16.683-16.683-43.691-16.683-60.331 0s-16.683 43.691 0 60.331z"></path></svg></span><span class="compareiconactive"><svg class="" style="display:inline-block;vertical-align:middle" width="16" height="16" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path style="fill:#565D66" d="M871.696 166.932l-526.088 526.088-193.304-193.304c-9.372-9.372-24.568-9.372-33.942 0l-56.568 56.568c-9.372 9.372-9.372 24.568 0 33.942l266.842 266.842c9.372 9.372 24.568 9.372 33.942 0l599.626-599.626c9.372-9.372 9.372-24.568 0-33.942l-56.568-56.568c-9.372-9.372-24.568-9.372-33.94 0z"></path></svg></span> | |
<!-- /wp:greenshift-blocks/product-comparison --> | |
<!-- wp:greenshift-blocks/wishlist {"id":"gsbp-2a8dcbce-7a13","inlineCssStyles":null,"shadow":{"hoffset":0,"voffset":2,"blur":4,"spread":0,"color":"rgba(0, 0, 0, 0.07)","position":null},"border":{"borderRadius":{"values":{"topLeft":["93"],"topRight":["93"],"bottomRight":["93"],"bottomLeft":["93"]},"unit":"px","locked":true},"style":[],"size":[],"color":[],"styleHover":[],"sizeHover":[],"colorHover":[]},"background":{"color":"#ffffff"},"iconSpacing":{"margin":{"values":{"top":["0px"],"right":["0px"],"bottom":["0px"],"left":["0px"]},"unit":["px","px","px","px"],"locked":true},"padding":{"values":{"top":[11,null,null,9],"right":[11,null,null,9],"bottom":[11,null,null,9],"left":[11,null,null,9]},"unit":["px","px","px","px"],"locked":true}},"colorIcon":"#747b8f","size":[18,null,null,14],"icontype":"wishlist","loading":false,"wishlistadd":"","wishlistadded":"","disableCounter":true} /--></div> | |
<!-- /wp:greenshift-blocks/container --> | |
<!-- wp:greenshift-blocks/container {"id":"gsbp-c0194099-61dc","inlineCssStyles":null,"flexGrow":[1],"flexbox":{"type":"flexbox","flexDirection":["column"],"justifyContent":["space-between"]},"spacing":{"margin":{"values":[],"unit":["px","px","px","px"],"locked":false},"padding":{"values":{"top":[15],"right":[15],"bottom":[15],"left":[15]},"unit":["px","px","px","px"],"locked":true}}} --> | |
<div class="wp-block-greenshift-blocks-container gspb_container gspb_container-gsbp-c0194099-61dc" id="gspb_container-id-gsbp-c0194099-61dc"><!-- wp:greenshift-blocks/container {"id":"gsbp-741cab1f-5910","inlineCssStyles":null} --> | |
<div class="wp-block-greenshift-blocks-container gspb_container gspb_container-gsbp-741cab1f-5910" id="gspb_container-id-gsbp-741cab1f-5910"><!-- wp:greenshift-blocks/dynamic-post-title {"id":"gsbp-a718e0dd-d33f","inlineCssStyles":null,"spacing":{"margin":{"values":{"bottom":["15px"],"top":["0px"]},"unit":["px","px","px","px"],"locked":false},"padding":{"values":[],"unit":["px","px","px","px"],"locked":false}},"typography":{"textShadow":[],"size":["18px",null,null,"15px"],"line_height":["25px",null,null,"20px"],"decoration":"remove","customweight":"normal","relativeHover":true,"hoverClass":".gspbgrid_item","colorHover":"var(\u002d\u002dwp\u002d\u002dpreset\u002d\u002dcolor\u002d\u002dprimary, #7000f4)"},"blockWidth":{"customWidth":{"value":[],"unit":["px","px","px","px"]},"customHeight":{"value":[],"unit":["px","px","px","px"]},"heightType":"custom","minHeight":["50px",null,null,"40px"]},"clampEnable":true,"clamp":[2,null,null,null]} /--> | |
<!-- wp:greenshift-blocks/product-availability {"id":"gsbp-866f5407-5ad0","inlineCssStyles":null,"typography":{"textShadow":[],"color":"#00c117","line_height":[16],"size":[16]},"loading":false} /--> | |
<!-- wp:greenshift-blocks/product-rating {"id":"gsbp-3ae5e4cc-11e5","inlineCssStyles":null,"spacing":{"margin":{"values":{"bottom":["10"]},"unit":["px","px","px","px"],"locked":false},"padding":{"values":[],"unit":["px","px","px","px"],"locked":false}},"loading":false} /--></div> | |
<!-- /wp:greenshift-blocks/container --> | |
<!-- wp:greenshift-blocks/container {"id":"gsbp-3a447ee5-654d","inlineCssStyles":null,"flexbox":{"type":"flexbox","flexDirection":["row",null,null,"column"],"justifyContent":["space-between"],"alignItems":["center",null,null,"stretch"],"flexWrap":["nowrap"]}} --> | |
<div class="wp-block-greenshift-blocks-container gspb_container gspb_container-gsbp-3a447ee5-654d" id="gspb_container-id-gsbp-3a447ee5-654d"><!-- wp:greenshift-blocks/product-price {"id":"gsbp-f0303274-690a","inlineCssStyles":null,"spacing":{"margin":{"values":{"bottom":["10"]},"unit":["px","px","px","px"],"locked":false},"padding":{"values":[],"unit":["px","px","px","px"],"locked":false}},"loading":false,"typography":{"textShadow":[],"size":["23px",null,null,"18px"],"customweight":"bold","line_height":["25px",null,null,"20px"]},"typographyVariable":{"textShadow":[],"size":["20px"]},"typographyOldprice":{"textShadow":[],"size":[18],"color":"#b2bbc9","line_height":["18px"],"customweight":"normal"},"oldpriceLine":true} /--> | |
<!-- wp:greenshift-blocks/product-button {"id":"gsbp-00b0da98-b4c9","inlineCssStyles":null,"border":{"borderRadius":{"values":{"topLeft":"50","topRight":"50","bottomRight":"50","bottomLeft":"50"},"unit":"px","locked":true},"style":[],"size":[],"color":[],"styleHover":[],"sizeHover":[],"colorHover":[]},"background":{"color":"var(\u002d\u002dwp\u002d\u002dpreset\u002d\u002dcolor\u002d\u002dprimary, #7000f4)"},"spacingButton":{"margin":{"values":[],"unit":["px","px","px","px"],"locked":false},"padding":{"values":{"top":[2,null,null,0],"right":[2,null,null,0],"bottom":[2,null,null,0],"left":[2,null,null,0]},"unit":["px","px","px","px"],"locked":true}},"iconBox_icon":{"icon":{"font":"rhicon rhi-cartsmooth","svg":"","image":""},"fill":"currentColor","fillhover":"currentColor","type":"font","iconSize":["20px"]},"enableicon":true,"disablelink":false,"disabletext":true,"blockWidth":{"customWidth":{"value":[45],"unit":["px","px","px","px"]},"customHeight":{"value":[45],"unit":["px","px","px","px"]},"widthType":"custom","heightType":"custom"}} --> | |
<span class="woobtnicon"><svg class="" style="display:inline-block;vertical-align:middle" width="16" height="16" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path style="fill:#565D66" d="M824.64 687.702h-357.413c-51.597 0-106.834-37.604-125.736-85.624l-144.438-366.634c-7.626-19.363-34.499-37.657-55.31-37.657h-103.886c-20.905 0.010-37.856-16.94-37.856-37.846s16.951-37.856 37.856-37.856h103.897c51.608 0 106.834 37.604 125.736 85.624l144.438 366.634c7.626 19.363 34.499 37.657 55.3 37.657h357.413c20.297 0 45.891-18.094 52.656-37.216l69.628-196.759c1.951-5.507 1.458-8.863 0.923-9.629-0.545-0.766-3.545-2.339-9.388-2.339h-492.936c-20.905 0-37.856-16.951-37.856-37.856s16.951-37.856 37.856-37.856h492.936c29.821 0 55.772 12.524 71.212 34.353 15.43 21.828 18.577 50.464 8.622 78.576l-69.628 196.759c-17.391 49.153-71.873 87.67-124.026 87.67z"></path><path style="fill:#565D66" d="M454.052 817.79c0 46.461-37.664 84.124-84.124 84.124s-84.124-37.664-84.124-84.124c0-46.461 37.664-84.124 84.124-84.124s84.124 37.664 84.124 84.124z"></path><path style="fill:#565D66" d="M993.434 817.79c0 46.461-37.664 84.124-84.124 84.124s-84.124-37.664-84.124-84.124c0-46.461 37.664-84.124 84.124-84.124s84.124 37.664 84.124 84.124z"></path><path style="fill:#565D66" d="M823.297 456.831h-334.368c-10.458 0-18.923-8.475-18.923-18.923 0-10.458 8.475-18.923 18.923-18.923h334.368c10.458 0 18.923 8.475 18.923 18.923s-8.465 18.923-18.923 18.923z"></path><path style="fill:#565D66" d="M797.724 551.466h-274.684c-10.447 0-18.923-8.475-18.923-18.923 0-10.458 8.475-18.923 18.923-18.923h274.695c10.458 0 18.923 8.475 18.923 18.923-0.010 10.447-8.475 18.923-18.933 18.923z"></path></svg></span><span class="woobtniconactive"><svg class="" style="display:inline-block;vertical-align:middle" width="16" height="16" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path style="fill:#565D66" d="M871.696 166.932l-526.088 526.088-193.304-193.304c-9.372-9.372-24.568-9.372-33.942 0l-56.568 56.568c-9.372 9.372-9.372 24.568 0 33.942l266.842 266.842c9.372 9.372 24.568 9.372 33.942 0l599.626-599.626c9.372-9.372 9.372-24.568 0-33.942l-56.568-56.568c-9.372-9.372-24.568-9.372-33.94 0z"></path></svg></span><span class="woobtnloading"><svg width="26" height="26" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 100 100"><path fill="currentColor" d="M73,50c0-12.7-10.3-23-23-23S27,37.3,27,50 M30.9,50c0-10.5,8.5-19.1,19.1-19.1S69.1,39.5,69.1,50"><animateTransform attributeName="transform" attributeType="XML" type="rotate" dur="1s" from="0 50 50" to="360 50 50" repeatCount="indefinite"></animateTransform></path></svg></span> | |
<!-- /wp:greenshift-blocks/product-button --></div> | |
<!-- /wp:greenshift-blocks/container --></div> | |
<!-- /wp:greenshift-blocks/container --> | |
<!-- /wp:greenshift-blocks/querygrid --> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment