-
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add cookies popup, add empty pages privacy and cookies, add links to footer * Add cookies switcher to config
- Loading branch information
1 parent
c07e15f
commit 2f08c32
Showing
9 changed files
with
133 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
type: "page" | ||
title: "Cookies Policy" | ||
subtitle: "" | ||
draft: false | ||
--- | ||
|
||
{{< content-start classes="content narrow">}} | ||
|
||
# Our Cookies Policy | ||
|
||
[TBD] | ||
|
||
{{< content-end >}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
type: "page" | ||
title: "Privacy Policy" | ||
subtitle: "" | ||
draft: false | ||
--- | ||
|
||
{{< content-start classes="content narrow">}} | ||
|
||
# Our Privacy Policy | ||
|
||
[TBD] | ||
|
||
{{< content-end >}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
* { | ||
margin: 0; | ||
} | ||
|
||
body { | ||
font-family: "Roboto", sans-serif; | ||
} | ||
|
||
p { | ||
margin: 16px 0 8px; | ||
line-height: 1.4; | ||
font-weight: 400; | ||
} | ||
|
||
.wrapper { | ||
padding: 24px; | ||
} | ||
|
||
.cookie-container { | ||
position: fixed; | ||
bottom: -100%; | ||
left: 10px; | ||
font-size: 14px; | ||
width: 300px; | ||
line-height: 19px; | ||
z-index: 10000; | ||
background: #ffffff; | ||
color: #888888; | ||
border-radius: 10px; | ||
padding: 0 32px; | ||
box-shadow: 0 -2px 16px rgba(47, 54, 64, 0.15); | ||
transition: 400ms; | ||
} | ||
.cookhead { | ||
font-weight: 600; | ||
color: black; | ||
line-height: 1; | ||
margin-top: 24px; | ||
font-size: 18px; | ||
} | ||
.cookie-container.active { | ||
bottom: 10px; | ||
} | ||
|
||
.cookie-container a { | ||
color: #3a9800; | ||
font-weight: 400; | ||
} | ||
|
||
.cookie-btn { | ||
background: #f1903b; | ||
border: 0; | ||
color: #f5f6fa; | ||
padding: 12px 48px; | ||
width: 100%; | ||
font-size: 12px; | ||
margin-bottom: 16px; | ||
border-radius: 8px; | ||
cursor: pointer; | ||
} | ||
.cookie-btn:hover { | ||
background: #f1813b; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
const cookieContainer = document.querySelector(".cookie-container"); | ||
const cookieButton = document.querySelector(".cookie-btn"); | ||
|
||
cookieButton.addEventListener("click", () => { | ||
cookieContainer.classList.remove("active"); | ||
localStorage.setItem("cookieBannerDisplayed", "true"); | ||
}); | ||
|
||
setTimeout(() => { | ||
if (!localStorage.getItem("cookieBannerDisplayed")) { | ||
cookieContainer.classList.add("active"); | ||
} | ||
}, 2000); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
themes/hugo-bulma-blocks-theme/layouts/partials/cookie-notice.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<div class="cookie-container"> | ||
<p> | ||
We use cookies 🍪. This improves the site’s performance and makes it | ||
more efficient. By continuing to use this site, you agree to our | ||
<a href="/privacy/">privacy policy</a> and | ||
<a href="/cookies/">cookie policy</a>. | ||
</p> | ||
<button class="cookie-btn">Got it</button> | ||
</div> | ||
<script src="/my_js/cookie.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters