ryanmariehelfant Posted October 28, 2020 Share Posted October 28, 2020 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! Link to comment
Beyondspace Posted October 29, 2020 Share Posted October 29, 2020 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> BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox, video lightbox and much more) 🗓️ Delivery Date Picker (Squarespace Date picker form field) 💫 Gallery block 7.1 workaround 🥳 No-code customisations for Squarespace (+100 Spark plugin customisations) 🥳 Freemium Squarespace Widget Templates (+1000 Elfsight Templates) If you find my answer useful, 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 BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox, video lightbox and much more) 🗓️ Delivery Date Picker (Squarespace Date picker form field) 💫 Gallery block 7.1 workaround 🥳 No-code customisations for Squarespace (+100 Spark plugin customisations) 🥳 Freemium Squarespace Widget Templates (+1000 Elfsight Templates) If you find my answer useful, 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? 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> BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox, video lightbox and much more) 🗓️ Delivery Date Picker (Squarespace Date picker form field) 💫 Gallery block 7.1 workaround 🥳 No-code customisations for Squarespace (+100 Spark plugin customisations) 🥳 Freemium Squarespace Widget Templates (+1000 Elfsight Templates) If you find my answer useful, 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 BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox, video lightbox and much more) 🗓️ Delivery Date Picker (Squarespace Date picker form field) 💫 Gallery block 7.1 workaround 🥳 No-code customisations for Squarespace (+100 Spark plugin customisations) 🥳 Freemium Squarespace Widget Templates (+1000 Elfsight Templates) If you find my answer useful, 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 BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox, video lightbox and much more) 🗓️ Delivery Date Picker (Squarespace Date picker form field) 💫 Gallery block 7.1 workaround 🥳 No-code customisations for Squarespace (+100 Spark plugin customisations) 🥳 Freemium Squarespace Widget Templates (+1000 Elfsight Templates) If you find my answer useful, 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 BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox, video lightbox and much more) 🗓️ Delivery Date Picker (Squarespace Date picker form field) 💫 Gallery block 7.1 workaround 🥳 No-code customisations for Squarespace (+100 Spark plugin customisations) 🥳 Freemium Squarespace Widget Templates (+1000 Elfsight Templates) If you find my answer useful, 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> BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox, video lightbox and much more) 🗓️ Delivery Date Picker (Squarespace Date picker form field) 💫 Gallery block 7.1 workaround 🥳 No-code customisations for Squarespace (+100 Spark plugin customisations) 🥳 Freemium Squarespace Widget Templates (+1000 Elfsight Templates) If you find my answer useful, 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 BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox, video lightbox and much more) 🗓️ Delivery Date Picker (Squarespace Date picker form field) 💫 Gallery block 7.1 workaround 🥳 No-code customisations for Squarespace (+100 Spark plugin customisations) 🥳 Freemium Squarespace Widget Templates (+1000 Elfsight Templates) If you find my answer useful, 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> BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox, video lightbox and much more) 🗓️ Delivery Date Picker (Squarespace Date picker form field) 💫 Gallery block 7.1 workaround 🥳 No-code customisations for Squarespace (+100 Spark plugin customisations) 🥳 Freemium Squarespace Widget Templates (+1000 Elfsight Templates) If you find my answer useful, 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! Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.