Jump to content

joeridecock

Circle Member
  • Posts

    6
  • Joined

  • Last visited

Reputation Activity

  1. Love
    joeridecock got a reaction from KimmyBartle in Full viewport height page sections in 7.1 since Fluid Engine   
    Hi!
    A bit late to the party, but I've been having similar problems for quite some time with several websites running on 7.1. In my case, it mainly occurs with sections aligned to the bottom or the middle. The top-padding and/or bottom-padding of the section then becomes unnecessarily large (20vmax), as opposed to the 2.5vw spacing I set in the website's general spacing settings. This causes the section to go over the 'minimum' 100vh.
    I solved this for myself using the CSS below. This makes the padding of the sections the same everywhere (in my case 2.5).
    Sections aligned to the middle:
    .page-section.vertical-alignment--middle:not(.content-collection):not(.gallery-section):not(.user-items-list-section):not(.section-height--custom):not(.editmode-changing-rowcount).section-height--large>.content-wrapper { padding-top: 2.5vmax !important; padding-bottom: 2.5vmax !important; } Sections aligned to the bottom:
    .page-section.vertical-alignment--bottom:not(.content-collection):not(.gallery-section):not(.user-items-list-section):not(.section-height--custom):not(.editmode-changing-rowcount).section-height--large>.content-wrapper { padding-top: 2.5vmax !important; } Hopefully a final solution from Squarespace will follow soon.
  2. Like
    joeridecock got a reaction from tuanphan in Loading a random video banner on refresh   
    Hello!
    I recently had the same question. On the homepage of a website of mine, I had a video background using a Vimeo link. I wanted that video to switch randomly with other Vimeo videos on refresh. I succeeded by using the script below, which you need to paste into the header section of code injection. Change the provisional videoIDs (000000001 and 000000002) with the videoIDs of the Vimeo videos you want to target, and feel free to add more after the comma. Under fallbackVideo, you can specify a fallback video in the same way.
    Good luck.
     
    <!-- VIDEO BACKGROUND --> <script> window.onload = function() { var videoIDs = ['000000001', '000000002']; var fallbackVideo = '000000000'; var randomID = videoIDs[Math.floor(Math.random() * videoIDs.length)]; var vimeoPlayer = document.getElementById('vimeoplayer'); vimeoPlayer.onerror = function() { vimeoPlayer.src = '//player.vimeo.com/video/' + fallbackVideo + '?api=1&background=1'; } vimeoPlayer.src = '//player.vimeo.com/video/' + randomID + '?api=1&background=1'; } </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.