Jump to content

joeridecock

Circle Member
  • Posts

    6
  • Joined

  • Last visited

Everything posted by joeridecock

  1. 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>
  2. Hi. Are you on 7.1? Then you just have to hover over the respective section and click on 'edit section', then set your 'section height' as desired: S, M or L. Either click on the three dots and enter your own value. This value is the percentage of your browser window you want to fill (viewport). So in your case, anything less than 100. Alternatively, you can also disable 'fill screen' altogether, allowing you to choose and stretch how big everything should appear on the grid itself. Is that what you were looking for?
  3. 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.
×
×
  • 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.