Skip to content

Commit

Permalink
Improve cookie consent UX (#13111)
Browse files Browse the repository at this point in the history
  • Loading branch information
sicarul authored Oct 11, 2024
1 parent 448e309 commit baf3608
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 85 deletions.
24 changes: 18 additions & 6 deletions assets/css/bundle.css

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions assets/css/marketing.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/*!*********************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].use[1]!./node_modules/postcss-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].use[3]!./src/scss/_marketing.scss ***!
\*********************************************************************************************************************************************************************************************************************/
/*! tailwindcss v2.2.15 | MIT License | https://tailwindcss.com */

/*! modern-normalize v1.1.0 | MIT License | https://github.com/sindresorhus/modern-normalize */
Expand Down
67 changes: 1 addition & 66 deletions assets/js/bundle.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions assets/js/marketing.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -369,16 +369,17 @@
preferencesDialogContent: preferencesDialogContent,
cancelDialogTitle: cancelDialogTitle,
cancelDialogContent: cancelDialogContent,
shouldRequireConsent: () => true,
shouldRequireConsent: exports.inEU,
closeBehavior: exports.inEU() ? "dismiss" : "accept",
bannerTextColor: "black",
cdnHost: "evs.analytics.pulumi.com",
shouldReload: false
}
}
</script>

<script
src="https://unpkg.com/@segment/consent-manager@5.3.0/standalone/consent-manager.js"
src="https://unpkg.com/@segment/consent-manager@5.8.1/standalone/consent-manager.js"
defer
></script>

Expand Down
19 changes: 8 additions & 11 deletions theme/src/scss/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -393,25 +393,22 @@ section.newsletter-input pulumi-hubspot-form input.hs-input {
@apply rounded;
}

#segment-consent-manager:empty {
@apply hidden;
}
#segment-consent-manager {

> div:first-child {
@apply text-black fixed bottom-0 right-0 left-0 p-2 m-4 border-2 border-violet-600 rounded-lg shadow-lg;
z-index: 99999;
@apply text-black fixed bottom-0 right-0 left-0 p-2 m-4 border-2 border-violet-600 rounded-lg shadow-lg;
z-index: 99999;

@screen lg {
@apply w-1/3 left-auto m-4 overflow-hidden p-2;
}
@screen lg {
@apply w-1/3 left-auto m-4 overflow-hidden p-2;
}

div {
@apply bg-white;
}

div:empty {
@apply hidden;
}


p {
@apply text-black text-left text-sm pr-2;

Expand Down

0 comments on commit baf3608

Please sign in to comment.