Skip to content

Commit

Permalink
add decline allow btns
Browse files Browse the repository at this point in the history
  • Loading branch information
fantkolja committed Oct 22, 2024
1 parent 9ee9c6c commit 86b5961
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 8 deletions.
14 changes: 14 additions & 0 deletions src/css/cookie.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@
z-index: 1000;
}

.cookie-banner-btns-wrapper {
display: flex;
align-items: center;
justify-content: space-between;
gap: 10px;
}

.cookie-banner p {
margin: 0;
letter-spacing: 0.4px;
Expand Down Expand Up @@ -57,3 +64,10 @@
.decline-btn:hover {
background-color: #061827;
}

.manage-cookies-link {
color: var(--accent);
white-space: nowrap;
margin: 0 18px;
font-size: 13px;
}
2 changes: 1 addition & 1 deletion src/js/12-cookie-banner.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
'use strict'

var cookieBanner = document.getElementById('cookie')
var cookieButton = document.getElementById('cookie-close')
var cookieButton = document.getElementById('closeCookies')
var latestBanner = document.getElementById('latest-banner')

if (window.localStorage.getItem('docsCookie') !== 'closed') {
Expand Down
19 changes: 12 additions & 7 deletions src/partials/cookie.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,16 @@
This website uses cookies to ensure you get the best experience on our website.
<!-- <a href="https://hazelcast.com/privacy/?utm_source=docs-website">Learn more</a>-->
</p>
<button class="cookie-decision-btn decline-btn">
Decline
</button>
<button class="cookie-decision-btn allow-btn">
Allow All
</button>
<button class="cookie-close" id="cookie-close">&times;</button>
<div class="cookie-banner-btns-wrapper">
<a id="manageCookiesLink" href="javascript:void(0)" role="button" class="manage-cookies-link">
Manage Cookies
</a>
<button class="cookie-decision-btn decline-btn">
Decline
</button>
<button class="cookie-decision-btn allow-btn">
Allow
</button>
<button class="cookie-close" id="closeCookies">&times;</button>
</div>
</div>

0 comments on commit 86b5961

Please sign in to comment.