Skip to content

Commit

Permalink
Merge pull request #19 from tagconcierge/develop
Browse files Browse the repository at this point in the history
1.2.2
  • Loading branch information
mfrankiewicz committed Jun 4, 2024
2 parents ef456cc + 09ec482 commit d15c75f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
10 changes: 7 additions & 3 deletions src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,16 @@ function saveConsentState(consentState) {
}

// Components
function createMain(gtmCookiesConfig) {
function createMain(config) {
var main = document.createElement("div");
main.setAttribute('id', 'consent-banner-main');
main.setAttribute('data-mode', config.display.mode);
main.setAttribute('data-wall', config.display.wall ?? false);
main.style.display = 'none';
return main;
}

function createWall(gtmCookiesConfig) {
function createWall(config) {
var wall = document.createElement("div");
wall.setAttribute('id', 'consent-banner-wall');
return wall;
Expand Down Expand Up @@ -227,7 +229,9 @@ function showSettings(main) {
function hideSettings(main) {
main.style.display = 'block';
main.querySelector('#consent-banner-settings').style.display = 'none';
hideWall(main)
if ('true' !== main.getAttribute('data-wall')) {
hideWall(main);
}
}


Expand Down
2 changes: 1 addition & 1 deletion styles/light.css
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
#consent-banner-settings > div > form div:nth-child(2) {
max-height: none;
}
#consent-banner-modal {
#consent-banner-main:not([data-mode="bar"]) #consent-banner-modal {
width: auto;
left: 5% !important;
right: 5% !important;
Expand Down
1 change: 1 addition & 0 deletions www/bar.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type="text/css">
body {
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";
Expand Down
1 change: 1 addition & 0 deletions www/modal.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<!doctype html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type="text/css">
body {
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";
Expand Down

0 comments on commit d15c75f

Please sign in to comment.