diff --git a/js/index.js b/js/index.js index 5ea9ed13..5bb1a924 100644 --- a/js/index.js +++ b/js/index.js @@ -130,8 +130,12 @@ const app = new Vue({ directives: { sticky: { - inserted: el => { - stickybits(el) + inserted: (el, binding) => { + var customAttributes + if (binding.expression) { + customAttributes = JSON.parse(binding.expression) + } + stickybits(el, customAttributes) }, }, }, diff --git a/styles/components/_topbar.scss b/styles/components/_topbar.scss index a69ea78b..d2bff318 100644 --- a/styles/components/_topbar.scss +++ b/styles/components/_topbar.scss @@ -1,6 +1,12 @@ .topbar { background-color: $color-blue-darkest; border-bottom: 1px solid $color-black; + z-index: 16; + height: 48px; + + &.js-is-sticky { + width: 100%; + } &__navigation { display: flex; diff --git a/templates/components/sticky_cta.html b/templates/components/sticky_cta.html index b4c37d5a..d47e29cb 100644 --- a/templates/components/sticky_cta.html +++ b/templates/components/sticky_cta.html @@ -1,5 +1,5 @@ {% macro StickyCTA(text) -%} -