Jump to content

colin.irwin

Circle Member
  • Posts

    3,620
  • Joined

  • Last visited

  • Days Won

    92

Posts posted by colin.irwin

  1. This puts a grey 'glow' behind your navigation links. Put it in your custom css. 

    nav#main-navigation {
        text-shadow: 0px 0px 3px #aaa;
    }

    The parameters (in order) are

    • Horizontal shadow offset - currently set to 0px so it sits behind the image)
    • Vertical  shadow offset - currently set to 0px so it sits behind the image)
    • Blur radius - set to 3px so that it casts an omnidirectional shadow. Reduce this value to make the shadow sharper. 
    • Color - currently set to a mid gray
  2. There is a min-height of 33vh set on sections. You need to override that to get the sections smaller. 

    For all sections this would be:

    .page-section {
        min-height: 0 !important;
    }

    For a specific section you need to specify the data-section-id that can be found by inspecting the page code using your browser's developer tools.

    Somethig like this:

    .page-section[data-section-id="5d979fd8590a832f3c411579"] {
        min-height: 0 !important;
    }

     

  3. Something like this should work:

    
    
    body#collection-55a5af43e4b0aac39df22df0 {
       background-position: center top !important;
       background-image: url("//static1.squarespace.com/static/55a48db1e4b03b84d36b22fb/t/571e6768746fb924e954224b/1461610345514/Against%2BColorful%2Bgraffiti.jpg");
    }
    
    
    
    

  4. @arthurm

    Try the following for Marquee - I haven't tested it, but it should work.

    First create a link as the last item in your main navigation. This link should be called Search and link to /search as it appear as a link rather than an input box in the mobile navigation.

    Next create a search block in your site footer.

    Then add the following script to your sitewise code injection point.

    
    
    <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
    <script>
    $("#desktopNav .main-nav nav-wrapper > ul.cf > li:nth-last-child(1) a").replaceWith($(".search-block")); 
    </script>
    
    

    This replaces the last item in the site navigation with the search box.

    Finally, add some css to the custom css editor to tidy things up

    The specific css tweaks to make it look right will depend on your exact style configuration for your template.

  5. SEARCH IN MAIN NAVIGATION - FIVE TEMPLATE

    NB. I haven't applied this to a site - I've deduced the code by looking at the code of a site that uses the Five template. Please confirm and accept the answer if you apply it and it works. If there are any problems, post them as comments to this answer and I'll try to apply fixes.

    First create a link as the last item in your main navigation. This link should be called Search and link to /search as it appear as a link rather than an input box in the mobile navigation.

    Next create a search block in your site footer.

    Then add the following script to your sitewise code injection point.

    
    
    <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
    <script>
     $("nav#main-navigation > ul > li:nth-last-child(1) a").replaceWith($(".search-block"));
    </script>
    
    

    This replaces the last item in the site navigation with the search box.

    Finally, add some css to the custom css editor to tidy things up

    
    
    .sqs-block-search {
     padding-top:0 !important;
     padding-bottom:0 !important;
    }
    nav#main-navigation > ul li {
     vertical-align:middle;
    }
    .search-input {
     background-color: white !important;
     max-width:200px;
    
    }
    .search-input::-webkit-input-placeholder {
      color: black;
    }
    
    .search-input:-moz-placeholder { /* Firefox 18- */
      color: black;  
    }
    
    .search-input::-moz-placeholder {  /* Firefox 19+ */
      color: black;  
    }
    
    .search-input:-ms-input-placeholder {  
      color: black;  
    }
    
    
    
    

  6. Here's how I did it on my site, which uses the Aviator template.

    NB. The specific targeting for the scripts and css to work vary from template to template.

    First create a link as the last item in your main navigation. This link can be to anything, but calling it Search and linking to /search keeps things tidy.

    Next create a search block in your site footer.

    Then add the following script to your sitewise code injection point.

    
    
    <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
    <script>
     $(".cf li:nth-last-child(1) a").replaceWith($(".search-block"));
    </script>
    
    

    This replaces the last item in the site navigation with the search box.

    Finally, add some css to the custom css editor to tidy things up

    
    
    .sqs-block-search {
     padding-top:0 !important;
     padding-bottom:0 !important;
    }
    .cf li{
     vertical-align:middle;
    }
    .search-input {
     background-color: white !important;
     max-width:200px;
    
    }
    .search-input::-webkit-input-placeholder {
      color: black;
    }
    
    .search-input:-moz-placeholder { /* Firefox 18- */
      color: black;  
    }
    
    .search-input::-moz-placeholder {  /* Firefox 19+ */
      color: black;  
    }
    
    .search-input:-ms-input-placeholder {  
      color: black;  
    }
    
    

  7. Am I missing something @SquarespaceGuru, or does your method simply add a link to the search page to the menu bar rather than have a functioning search input box in the menu bar?

    @jpwv I use a hybrid approach: add a link to Search to the menu bar and a search block in the footer. Then use script and custom css to replace the link with the search block and style it nicely. This gives a fully functioning search input box in the menu bar.

    See http://www.silvabokis.com/

  8. 2 tier open/close using h1 and h2 in a markdown block

    First, the markdown

    
    
    # + This is an item
    
    This is the first line of an answer to the question above. This is a second line of the answer. 
    
    * Bullet points
    * Can be used too
    
    ## + This is subitem 1
    
    Subitem 1 copy
    
    ## + This is a second subitem
    
    Some copy for the second subitem
    
    # + This is a second item
    
    Here is subsection content
    
    # + This is a third item
    
    It also has content
    
    # + This is a fourth item
    
    This is a one line answer to the question above. 
    
    

    An h1 ( single # ) represents a folder

    An h2 ( double # ) represents a subfolder.

    The jQuery script is as follows:

    
    
    <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js">
    </script>
    
    <script>$(document).ready(function(){
    
    /* Setup cursors to show over h1 & h2 */
    $('.markdown-block .sqs-block-content h1, .markdown-block .sqs-block-content     h2').css('cursor','pointer');
    
    /* Close h1s and h2s to begin with */
    $('.markdown-block .sqs-block-content h1').nextUntil('h1').slideUp();
    
    /* Open clicked h1 and close all others*/ 
    $('.markdown-block .sqs-block-content h1').click(function () {
    $('.markdown-block .sqs-block-content h1').nextUntil('h1').slideUp();
    $(this).nextUntil('h1').slideDown();
    /* But we need to force the subfolders to close  */
    $('.markdown-block .sqs-block-content h2').nextUntil('h2, h1').hide();
    /* Also disable pointer events for just this h1*/
    $('.markdown-block .sqs-block-content h1, .markdown-block .sqs-block-content h2').css('pointer-events','auto');
    $(this).css('pointer-events','none');
    
    });
    /* Toggling for h2 folders */ 
    $('.markdown-block .sqs-block-content h2').click(function () {
    $(this).nextUntil('h2, h1').slideToggle();
    });
    
    });
    </script>
    
    

×
×
  • 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.