Skip to content

Commit

Permalink
Updated the button position and stickyness
Browse files Browse the repository at this point in the history
  • Loading branch information
felixaschultz committed Sep 29, 2023
1 parent ff4465c commit ad2cb52
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 21 deletions.
52 changes: 32 additions & 20 deletions cb.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,24 @@
moreContentText.setAttribute("class", "intastellarCookieConstents__content-main");;

const intastellarCookieConstents__Container = document.createElement("article");
const intastellarCookieButtons = document.createElement("section");

const testSection = document.createElement("section");
testSection.setAttribute("class", "intastellarCookieConstents__contentC");
testSection.appendChild(moreintHeader);

testSection.appendChild(moreContentText);

moreSettingsContent.appendChild(intastellarCookieConstents__Container);
intastellarCookieConstents__Container.appendChild(testSection);
intastellarCookieConstents__Container.appendChild(intastellarCookieButtons);
intastellarCookieConstents__Container.appendChild(moreFooter);

const cookieSettings = document.createElement("article");
const cookieSettingsContent = document.createElement("section");

bannerContent.setAttribute("class", "intastellarCookie-settingsContainer");
intastellarCookieButtons.setAttribute("class", "intastellarCookie-settings__buttons");
bannerContent.setAttribute("title", intastellarCookieLanguageSettings);
cookieSettings.setAttribute("class", "intastellarCookie-settings__container");
banner.setAttribute("onclick","javascript:IntastellarCookieConsent.renew();");
Expand Down Expand Up @@ -116,14 +119,19 @@
messageWrapStart
+ messages.danish
+ messageWrapEnd
+ generatePolicyUrl('Vores privat og cookie politik');
+ generatePolicyUrl('Vores privat og cookie politik')
+ `<section class="intCookieSaveSettingsContainer">
${generateCookieSettingsButton(intastellarSupportedLanguages.danish.saveSettings, 'Accepter')}
<button class="intLearnMoreBtn" >${intastellarShowHideDetailsText}</button>
</section>`;
cookieBtn = generateCookieButtons('Accepter', 'Afvis', 'Indstillinger');
intastellarCookieButtons.innerHTML = `<section class="intCookieSaveSettingsContainer">
${generateCookieSettingsButton(intastellarSupportedLanguages.danish.saveSettings, 'Accepter')}
<button class="intLearnMoreBtn" >${intastellarShowHideDetailsText}</button>
</section>`;
moreFooter.innerHTML =
`
<section class="intCookieSaveSettingsContainer">
${generateCookieSettingsButton(intastellarSupportedLanguages.danish.saveSettings, 'Accepter')}
<button class="intLearnMoreBtn" >${intastellarShowHideDetailsText}</button>
</section>
<section class="intastellar_privacyPolicy"></section>
<article class="intReadMore">
<section class="required">
Expand Down Expand Up @@ -209,14 +217,15 @@
message = messageWrapStart
+ messages.german
+ messageWrapEnd
+ generatePolicyUrl('Unsere Datenschutz Erklährung und Cookie politik');
+ generatePolicyUrl('Unsere Datenschutz Erklährung und Cookie politik')
;
intastellarCookieButtons.innerHTML = `<section class="intCookieSaveSettingsContainer">
${generateCookieSettingsButton(intastellarSupportedLanguages.german.saveSettings, 'Akzeptieren')}
<button class="intLearnMoreBtn" >${intastellarShowHideDetailsText}</button>
</section>`;
cookieBtn = generateCookieButtons('Akzeptieren', 'Ablehnen', 'Einstellungen');
moreFooter.innerHTML =
`
<section class="intCookieSaveSettingsContainer">
${generateCookieSettingsButton(intastellarSupportedLanguages.german.saveSettings, 'Akzeptieren')}
<button class="intLearnMoreBtn" >${intastellarShowHideDetailsText}</button>
</section>
<section class="intastellar_privacyPolicy"></section>
<article class="intReadMore">
<section class="required">
Expand Down Expand Up @@ -303,14 +312,16 @@
messageWrapStart
+ messages.english
+ messageWrapEnd
+ generatePolicyUrl('Our Privacy and cookie Policy');
+ generatePolicyUrl('Our Privacy and cookie Policy')
;
intastellarCookieButtons.innerHTML = `<section class="intCookieSaveSettingsContainer">
${generateCookieSettingsButton(intastellarSupportedLanguages.english.saveSettings, 'Accept')}
<button class="intLearnMoreBtn" >${intastellarShowHideDetailsText}</button>
</section>`;
cookieBtn = generateCookieButtons('Accept', 'Decline All', 'Settings');
moreFooter.innerHTML =
`
<section class="intCookieSaveSettingsContainer">
${generateCookieSettingsButton(intastellarSupportedLanguages.english.saveSettings, 'Accept')}
<button class="intLearnMoreBtn" >${intastellarShowHideDetailsText}</button>
</section>
<section class="intastellar_privacyPolicy"></section>
<article class="intReadMore">
<section class="required">
Expand Down Expand Up @@ -399,13 +410,14 @@
+ messages.danish
+ messageWrapEnd
+ generatePolicyUrl('Vores privat og cookie politik');
intastellarCookieButtons.innerHTML = `<section class="intCookieSaveSettingsContainer">
${generateCookieSettingsButton(intastellarSupportedLanguages.danish.saveSettings, 'Accept')}
<button class="intLearnMoreBtn" >${intastellarShowHideDetailsText}</button>
</section>`;

cookieBtn = generateCookieButtons('Accepter', 'Afvis', 'Indstillinger');
moreFooter.innerHTML =
`
<section class="intCookieSaveSettingsContainer">
${generateCookieSettingsButton(intastellarSupportedLanguages.danish.saveSettings, 'Accepter')}
<button class="intLearnMoreBtn" >${intastellarShowHideDetailsText}</button>
</section>
<section class="intastellar_privacyPolicy"></section>
<article class="intReadMore">
<section class="required">
Expand Down
Loading

0 comments on commit ad2cb52

Please sign in to comment.