Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added cookies pop up #30

Merged
merged 2 commits into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions config/_default/params.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,11 @@ facebook = "" # Your verification code
mastodon = "" # Your verification code

# cookies
# cookies module: https://github.com/gethugothemes/hugo-modules/tree/master/components/cookie-consent
[cookies]
enable = false
enable = true
expire_days = 60
content = "This site uses cookies. By continuing to use this website, you agree to their use."
button = "I Accept"
content = "This site uses cookies. Please see privacy policy."
button = "Got it"

######################## sidebar widgets #########################
[widgets]
Expand Down
1 change: 0 additions & 1 deletion hugo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@ link = "js/modal.js"
lazy = true
[[params.plugins.js]]
link = "plugins/cookie.js"
lazy = true
[[params.plugins.js]]
link = "plugins/youtube-lite.js"
lazy = true
10 changes: 9 additions & 1 deletion themes/hugoplate/assets/scss/module-overrides.scss
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,15 @@

// cookie consent
.cookie-box {
@apply rounded-lg #{!important};
@apply left-[unset] w-[15rem] h-[7.785rem] text-[13.5px] right-[2rem] p-[1rem] rounded-lg #{!important};
}

.cookie-box-button {
@apply mt-[0.25rem] text-[0.7rem] pt-[0.27rem] pb-[0.27rem] pr-[0.7rem] pl-[0.7rem] bg-white
}

:is(.dark .btn-outline-primary).cookie-box-button {
@apply text-black
}

// slider
Expand Down