hugo-theme-zen icon indicating copy to clipboard operation
hugo-theme-zen copied to clipboard

Button to clear cookie

Open RonnyG2121 opened this issue 11 months ago • 10 comments

Hello.

This theme is great!

It's simple and I like it.

I have a question:

Where should I add the delete cookies button? In what area of ​​the page?

This is stated in the documentation, but it doesn't specify further. It only says that it is recommended to add a button

Another thing. When activated, the accept and reject buttons have no identifying text.

Thanks.

RonnyG2121 avatar May 14 '25 09:05 RonnyG2121

Hi!

You are free to place the button where ever you find it suitable. Many sites seems to place this kind of button/link in the site footer.

If you do not see any text for the cookie consent buttons my guess is that you set your site to a language that the Zen theme do not have a translation for, see https://github.com/frjo/hugo-theme-zen/tree/main/i18n.

If you create a i18n file for your language I would be happy to add it to the theme.

frjo avatar May 14 '25 12:05 frjo

I've already created a language file for Spanish. Now I need to know how I can contribute to your inclusion in the topic.

El mié, 14 may 2025, 2:23 p. m., Fredrik Jonsson @.***> escribió:

frjo left a comment (frjo/hugo-theme-zen#132) https://github.com/frjo/hugo-theme-zen/issues/132#issuecomment-2880020132

Hi!

You are free to place the button where ever you find it suitable. Many sites seems to place this kind of button/link in the site footer.

If you do not see any text for the cookie consent buttons my guess is that you set your site to a language that the Zen theme do not have a translation for, see https://github.com/frjo/hugo-theme-zen/tree/main/i18n .

If you create a i18n file for your language I would be happy to add it to the theme.

— Reply to this email directly, view it on GitHub https://github.com/frjo/hugo-theme-zen/issues/132#issuecomment-2880020132, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3TLQZROKZEQS7WI5C36TDD26MYU3AVCNFSM6AAAAAB5CZHECGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQOBQGAZDAMJTGI . You are receiving this because you authored the thread.Message ID: @.***>

RonnyG2121 avatar May 15 '25 00:05 RonnyG2121

Feel free to upload your es.toml here in this issue.

frjo avatar May 15 '25 06:05 frjo

Hello. Here's the language file for Spanish. I'm having a different issue: when I click the "Accept Cookies" button, they don't hide.

es.zip

RonnyG2121 avatar May 15 '25 07:05 RonnyG2121

Spanish translation added, thanks!

https://github.com/frjo/hugo-theme-zen/commit/24c48a9a07c060e7e963431818ded396ad66a0c1

A link to your site, or better yet a link to the code repo?

frjo avatar May 15 '25 09:05 frjo

The module hasn't been updated yet, as I'm using it as a Hugo module. Regarding cookies, I haven't yet managed to get the buttons to hide when I click accept.

RonnyG2121 avatar May 15 '25 11:05 RonnyG2121

Made a new release now.

As mentioned in comment above I need to at least see your site or better yet your code repo to be able to help.

frjo avatar May 15 '25 14:05 frjo

Here's my link to my site repository.

My repository

I updated the module and I have the language file from spanish. Thanks

RonnyG2121 avatar May 15 '25 18:05 RonnyG2121

Now I see the issue, the hidden attribute is overridden by css display statements on an element with some weird results. Made a new release with a fix. Please report back if it works for you.

Some suggestion:

  1. Remove "public" and "_vendor" dir from your repo and add to ".gitignore".
  2. Remove ".hugo_build.lock" file from your repo and add to ".gitignore".
  3. Build with "libsass" instead of "dartsass" and you avoid all the "WARN Dart Sass". The Zen theme is moving to vanilla CSS.
  4. Set baseURL to your actual baseURL.

frjo avatar May 16 '25 07:05 frjo

Thanks, I'll try it out. I'm also adding Disqus to the site.

RonnyG2121 avatar May 16 '25 07:05 RonnyG2121