ryanmariehelfant Posted October 28, 2020 Share Posted October 28, 2020 (edited) Site URL: http://ryanmariehelfant.com/selected-films Hello, When I click on one of my gallery blocks, I can see my website's other gallery blocks beneath it. What is the CSS code to hide the other gallery blocks from appearing beneath the selected gallery block? Thank you! Edited October 28, 2020 by ryanmariehelfant Link to comment
Beyondspace Posted October 29, 2020 Share Posted October 29, 2020 (edited) You could use this snippet by pasting it into Settings->Advanced->Custom Code Injection <script> window.onhashchange = function() { [].forEach.call(document.querySelectorAll("#projectThumbs .project"), function(div) { div.style.display = "none"; }); var hash = location.hash; if (hash) { hash = hash.replace("#", ""); var proj = document.querySelector("#projectThumbs .project[href='"+hash+"']"); if (proj) { proj.style.display = "block"; } } else { [].forEach.call(document.querySelectorAll("#projectThumbs .project"), function(div) { div.style.display = "block"; }); } }; </script> Edited October 29, 2020 by bangank36 Greeting, it's BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Lightbox Studio pluginIf you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. Thank you Link to comment
Beyondspace Posted October 29, 2020 Share Posted October 29, 2020 Greeting, it's BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Lightbox Studio pluginIf you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. Thank you Link to comment
ryanmariehelfant Posted October 29, 2020 Author Share Posted October 29, 2020 Thank you @bangank36 is there also a way to get rid of the gallery thumbnail beneath the gallery video? Beyondspace 1 Link to comment
Beyondspace Posted October 29, 2020 Share Posted October 29, 2020 Just now, ryanmariehelfant said: Thank you @bangank36 is there also a way to get rid of the gallery thumbnail beneath the gallery video? <script> window.onhashchange = function() { [].forEach.call(document.querySelectorAll("#projectThumbs .project"), function(div) { div.style.display = "block"; }); var hash = location.hash; if (hash) { hash = hash.replace("#", ""); var proj = document.querySelector("#projectThumbs .project[href='"+hash+"']"); if (proj) { [].forEach.call(document.querySelectorAll("#projectThumbs .project"), function(div) { div.style.display = "none"; }); } } }; </script> Greeting, it's BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Lightbox Studio pluginIf you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. Thank you Link to comment
ryanmariehelfant Posted October 29, 2020 Author Share Posted October 29, 2020 Thank you @bangank36 Finally question! Is there also a way to get rid of the Footer Content beneath the Gallery Block (the contacts at the bottom center of my page with the names & email addresses) when I click on a Gallery Block? I would like to keep the contacts on my main page, but when I go to individual gallery blocks, I would not like that contact information to appear. Thank you so so much! Link to comment
Beyondspace Posted October 29, 2020 Share Posted October 29, 2020 <script> window.onhashchange = function() { [].forEach.call(document.querySelectorAll("#projectThumbs .project"), function(div) { div.style.display = "block"; }); document.querySelector("#footer").style.display = "block"; var hash = location.hash; if (hash) { hash = hash.replace("#", ""); var proj = document.querySelector("#projectThumbs .project[href='"+hash+"']"); if (proj) { [].forEach.call(document.querySelectorAll("#projectThumbs .project"), function(div) { div.style.display = "none"; }); document.querySelector("#footer").style.display = "none"; } } }; </script> Cheers Greeting, it's BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Lightbox Studio pluginIf you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. Thank you Link to comment
ryanmariehelfant Posted October 29, 2020 Author Share Posted October 29, 2020 @bangank36 Thank you!!! Link to comment
Beyondspace Posted October 29, 2020 Share Posted October 29, 2020 2 minutes ago, ryanmariehelfant said: @bangank36 Thank you!!! Thank you, please choose the correct answers so other people can know when they face the same issue Greeting, it's BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Lightbox Studio pluginIf you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. Thank you Link to comment
ryanmariehelfant Posted October 29, 2020 Author Share Posted October 29, 2020 @bangank36 When I refresh the page, it goes back to the old format (with thumbnails and contact info beneath the video). Is there Custom CSS to avoid this from happening when I refresh the page? Link to comment
Beyondspace Posted October 29, 2020 Share Posted October 29, 2020 3 minutes ago, ryanmariehelfant said: @bangank36 When I refresh the page, it goes back to the old format (with thumbnails and contact info beneath the video). Is there Custom CSS to avoid this from happening when I refresh the page? Interesting, I will update the code Greeting, it's BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Lightbox Studio pluginIf you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. Thank you Link to comment
Beyondspace Posted October 29, 2020 Share Posted October 29, 2020 Make sure to change the script location on footer custom injection <script> function checkProjectsHash() { [].forEach.call(document.querySelectorAll("#projectThumbs .project"), function(div) { div.style.display = "block"; }); document.querySelector("#footer").style.display = "block"; var hash = location.hash; if (hash) { hash = hash.replace("#", ""); var proj = document.querySelector("#projectThumbs .project[href='"+hash+"']"); if (proj) { [].forEach.call(document.querySelectorAll("#projectThumbs .project"), function(div) { div.style.display = "none"; }); document.querySelector("#footer").style.display = "none"; } } } checkProjectsHash(); window.onhashchange = function() { checkProjectsHash(); }; </script> Greeting, it's BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Lightbox Studio pluginIf you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. Thank you Link to comment
ryanmariehelfant Posted October 29, 2020 Author Share Posted October 29, 2020 @bangank36 Is there a way to hide the Title & Subtitle when I click on a Gallery Block? (So nothing is above the video, but the spacing between the top of the video and top of the website is maintained)? Cheers! Link to comment
Beyondspace Posted October 29, 2020 Share Posted October 29, 2020 2 hours ago, ryanmariehelfant said: @bangank36 Is there a way to hide the Title & Subtitle when I click on a Gallery Block? (So nothing is above the video, but the spacing between the top of the video and top of the website is maintained)? Cheers! Seems like you resolve it Greeting, it's BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Lightbox Studio pluginIf you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. Thank you Link to comment
ryanmariehelfant Posted October 30, 2020 Author Share Posted October 30, 2020 @bangank36 Unfortuantely not! The Title and Subtitle are unfortunately still there ("RYAN MARIE HELFANT | DIRECTOR OF PHOTOGRAPHY"). I just changed the name. Is there possibly more CSS to make it disappear when I click on Gallery Blocks? Thank you so much! Link to comment
Beyondspace Posted October 30, 2020 Share Posted October 30, 2020 <script> function checkProjectsHash() { [].forEach.call(document.querySelectorAll("#projectThumbs .project"), function(div) { div.style.display = "block"; }); document.querySelector("#footer").style.display = "block"; document.querySelector("#header").style.visibility = "visible"; var hash = location.hash; if (hash) { hash = hash.replace("#", ""); var proj = document.querySelector("#projectThumbs .project[href='"+hash+"']"); if (proj) { [].forEach.call(document.querySelectorAll("#projectThumbs .project"), function(div) { div.style.display = "none"; }); document.querySelector("#footer").style.display = "none"; document.querySelector("#header").style.visibility = "hidden"; } } } checkProjectsHash(); window.onhashchange = function() { checkProjectsHash(); }; </script> Greeting, it's BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Lightbox Studio pluginIf you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. Thank you Link to comment
ryanmariehelfant Posted October 30, 2020 Author Share Posted October 30, 2020 Thank you! Beyondspace 1 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment