HubSpot CMS

FW Parallaxy Banner

Hope you're ready to get Parallaxy because with FW Parallax banner you're going to rock it like it's the 2010's. This Parallax banner is garunteed to work in IE 10, IE 11, and the latest versions of Edge, Firefox, Chrome and Safari.

Unverified
?

After receiving a minimum of 25 recommendations, an entry earns the "Community Approved" badge.

Please keep in mind, all entries are community created and may not be fully supported by HubSpot.

6 Recommendations

View on:

GitHub

HTML + HUBL
{%- set pos_class = "" -%}
{%- if position_content =="centered" -%}
  {%- set pos_class = "v-center h-center" -%}
{%- elif position_content =="top-left" -%}
  {%- set pos_class = "" -%}
{%- elif position_content =="center-left" -%}
  {%- set pos_class = "v-center" -%}
{%- elif position_content =="top-center" -%}
  {%- set pos_class = "h-center" -%}
{%- elif position_content =="custom" -%}
  {%- set pos_class = module.custom_positioning_class -%}
{%- endif -%}
<div class="parallax-module-wrapper" data-content-position="{{position_content}}">
  <div class="parallax-module" style="background-image: url({{ module.background.src }}); background-position: 50% 100%; " data-bottom-top="background-position: 50% 0%;"  data-top-bottom="background-position: 50% 100%;"
    >
    <div class="parallax-module__content {{pos_class}}">
     
    </div>
   </div>
</div>
{{require_js("https://cdnjs.cloudflare.com/ajax/libs/skrollr/0.6.30/skrollr.min.js","head")}}

          
        
CSS
          
            
.parallax-module-wrapper .parallax-module {
  height: 500px;
  background-size: cover;
  position: relative;
  padding: 15px;
  box-sizing: border-box;
  overflow: hidden;
}
.parallax-module-wrapper .parallax-module__content.v-center {
  position: absolute;
  top: 50%;
  -webkit-transform: translateY(-50%);
          transform: translateY(-50%);
}
.parallax-module-wrapper .parallax-module__content.h-center {
  position: absolute;
  left: 50%;
  -webkit-transform: translateX(-50%);
          transform: translateX(-50%);
}
.parallax-module-wrapper .parallax-module__content.v-center.h-center {
  -webkit-transform: translate(-50%, -50%);
          transform: translate(-50%, -50%);
}

          
        
JS
          
            var s = skrollr.init();

          
        
Have Questions?

Ask technical questions in Slack.

HubSpot Developer Slack

Not a member yet? - join here
READ ME (VIEW IN GITHUB)

Full Width Parallax Banner

This Custom Module, offers several different options for creating a parallax banner.

This banner is garunteed to work in IE 10, IE 11, and the latest versions of Edge, Chrome, Firefox and Safari.

 
6 Recommendations

Jon McLaren

@HubSpot

Web Developer, HubSpot Development Specialist

View Jon McLaren’s Gallery (4 Entries)

Other Open Source Projects

Browse all other open source projects

CrankShaft Framework

A modern framework for accelerating build times on the HubSpot CMS. Based on a modified Bootstrap 4 framework.

Lead developers: Jon McLaren

Developer Chrome Extension

Chrome/Chromium extension for HubSpot CMS Developers that adds a developer menu, dark theme and useful shortcuts to commonly used HubSpot query parameters, resources, and tools for making HubSpot Development easier and more enjoyable.

Lead developers: Jon McLaren , William Spiro , Gonzalo Torreras

VS Code HubL Language Extension

This extension enables super fast local development of CMS pages, and is a great compliment to using the new local HubL server. It contains comprehensive HubL tag, function, filter and expression test auto-complete snippets, as well as their documentation.

Lead developers: William Spiro

Not coding on HubSpot CMS yet?

We invite you to explore why thousands of developers LOVE coding with HubSpot!

Contribute
Made with  by community members: InboundLabs.co