Jump to content

Slide Up/Reveal Code on a Image Block

Recommended Posts

  • Replies 8
  • Views 1.1k
  • Created
  • Last Reply
8 minutes ago, DarrenLyons said:

@bangank36 @tuanphan are you able to help? Your assistance is greatly appreciated. 👍

I am setting up a detail so others can follow as well

image.png.7651cd5e54fa530fbf35edfe71c7c4e9.png

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget 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

Paste this snippet into your Design->Custom CSS. it will help turn Poster image block within a section into sliding caption

:root {
    --overlay-color: #f0d23d;
    --text-color: #000;
    --animate-type: ease;
    --heading-font: inherit;
    --heading-font-size: inherit;
    --body-font: inherit;
    --body-font-size: inherit;
  
}
section[data-section-id="5ff9b43fb796f940d47ba48c"] .sqs-block-image .image-title-wrapper .image-title * {
  display: none;
}
section[data-section-id="5ff9b43fb796f940d47ba48c"] .sqs-block-image .image-title-wrapper .image-title h1,
section[data-section-id="5ff9b43fb796f940d47ba48c"] .sqs-block-image .image-title-wrapper .image-title h2,
section[data-section-id="5ff9b43fb796f940d47ba48c"] .sqs-block-image .image-title-wrapper .image-title h3,
section[data-section-id="5ff9b43fb796f940d47ba48c"] .sqs-block-image .image-title-wrapper .image-title h4 {
  margin-top: 1em !important;
  margin-bottom: 1em !important;
  font-family: var(--heading-font);
}
section[data-section-id="5ff9b43fb796f940d47ba48c"] .sqs-block-image .image-title-wrapper *:not([data-rte-preserve-empty="true"]) {
  display: block;
  text-align: center;
  color: var(--text-color);
  font-family: var(--body-font);
}
section[data-section-id="5ff9b43fb796f940d47ba48c"] .sqs-block-image .image-card-wrapper {
  background: var(--overlay-color);
  transition: .5s var(--animate-type);
  height: 0;
  overflow: hidden;
  top: auto !important;
}
section[data-section-id="5ff9b43fb796f940d47ba48c"] .sqs-block-image:hover {
  cursor: pointer;
}
section[data-section-id="5ff9b43fb796f940d47ba48c"] .sqs-block-image:hover .image-card-wrapper {
  height: 100%;
}

Use this extension to find the correct section id and replace the text "section[data-section-id="5ff9b43fb796f940d47ba48c"]" in the above snippet

image.png.c85fec89f4e636730d1b8d84499260fb.png

The :root section allow you to change some basic style of the effect such color or font family, caption structure is heading 4 - paragraph 2 - space - paragraph 4 - paragraph 2

image.png.eeccb74e274a69964a1ef6edb537f56b.png

image.thumb.png.40faaa577b230a808e4cae683e0f1922.png

 

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget 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
2 minutes ago, DarrenLyons said:

This all looks great. When using the ID extension, I do not get a data section code, only a block code. Please see attached screen shot.

I think this is preventing the code from working.

Screen Shot 2021-01-15 at 10.29.26 AM.png

What is your template name, did it support index page section?

You can also replace the section by the collection id to apply on the whole page

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget 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

Archived

This topic is now archived and is closed to further replies.

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