Jump to content

RyanDejaegher

Circle Member
  • Posts

    376
  • Joined

  • Last visited

  • Days Won

    5

Posts posted by RyanDejaegher

  1. @Frames_by_Saurabh

    It looks like Squarespace does some lazy loading on the images that aren't visible yet, so as you scroll and as these images are loaded the layout of the page is "repainted". Repainting can cause a bit of performance lag especially when a lot of elements are being repainted. 

    You could experiment with removing the code altogether and see if you run into the same issue. 

  2. @Pandagal Is this the effect you're after? If so this could should get you started

     

    /* Add this code to Design -> Custom CSS */
    
    .gallery-caption {
        position: absolute !important;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 102%;
        text-align:center;
        opacity: 0;
        transition: all .3s ease;
        background-color: white;
        height: 100%;
    }
    
    .gallery-masonry-item:hover .gallery-caption {
        opacity: 1;
        transition: all .3s ease;
    }
    
    .gallery-caption-wrapper {
        display: flex;
        place-items: center;
        justify-content: center;
    }

     

  3. Solution that doesn't require jQuery
     

    
    
    <script>
    // Add this code to Settings -> Advanced -> Code Injection -> Footer
    (function(){
    
    function shuffleChildren(parentSelector) {
        var parent = document.querySelector(parentSelector);
        
        parent.children.forEach((item,index) => {
            parent.appendChild(parent.children[Math.random() *index | 0])
        })   
    
    })();
    
      // Example
    shuffleChildren('.index-list');
    }
    </script>  

    Demo
     

  4. @JButler yes you can customize the style for category links, you'll need to copy the link/url and copy it to the code below. You can do this with blog categories or shop categories. 

    /* Add this code to Design -> Custom CSS */
    
    a[href="/shop?category=tumblers"] {
      color: red;
    }
    
    a[href="/shop?category=straws"] {
      color: blue;
    }

    Here's an example from another site with this code in place
    image.thumb.png.cd0eaf57f876fa426a577019cc2b391b.png

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.