Skip to content

Commit 09ec482

Browse files
authored
Merge pull request #18 from tagconcierge/release/1.2.2
fixes bar mode display mode responsiveness and missing wall after set…
2 parents 2a4fbc5 + d575667 commit 09ec482

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

src/app.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,16 @@ function saveConsentState(consentState) {
7575
}
7676

7777
// Components
78-
function createMain(gtmCookiesConfig) {
78+
function createMain(config) {
7979
var main = document.createElement("div");
8080
main.setAttribute('id', 'consent-banner-main');
81+
main.setAttribute('data-mode', config.display.mode);
82+
main.setAttribute('data-wall', config.display.wall ?? false);
8183
main.style.display = 'none';
8284
return main;
8385
}
8486

85-
function createWall(gtmCookiesConfig) {
87+
function createWall(config) {
8688
var wall = document.createElement("div");
8789
wall.setAttribute('id', 'consent-banner-wall');
8890
return wall;
@@ -227,7 +229,9 @@ function showSettings(main) {
227229
function hideSettings(main) {
228230
main.style.display = 'block';
229231
main.querySelector('#consent-banner-settings').style.display = 'none';
230-
hideWall(main)
232+
if ('true' !== main.getAttribute('data-wall')) {
233+
hideWall(main);
234+
}
231235
}
232236

233237

styles/light.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@
142142
#consent-banner-settings > div > form div:nth-child(2) {
143143
max-height: none;
144144
}
145-
#consent-banner-modal {
145+
#consent-banner-main:not([data-mode="bar"]) #consent-banner-modal {
146146
width: auto;
147147
left: 5% !important;
148148
right: 5% !important;

www/bar.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<!doctype html>
22
<html lang="en">
33
<head>
4+
<meta name="viewport" content="width=device-width, initial-scale=1" />
45
<style type="text/css">
56
body {
67
font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";

www/modal.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<!doctype html>
22
<html lang="en">
33
<head>
4+
<meta name="viewport" content="width=device-width, initial-scale=1" />
45
<style type="text/css">
56
body {
67
font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";

0 commit comments

Comments
 (0)