MrGreensWorkshop / MrGreen-JekyllTheme

Mr. Green is a multilingual theme generated with Jekyll and fully compatible with GitHub Pages.
https://jekyll-theme-mrgreen-demo.mrgreensworkshop.com
MIT License
154 stars 294 forks source link

When the theme is used with only one language, the consent box doesn't work #132

Closed MrGreensWorkshop closed 1 year ago

MrGreensWorkshop commented 1 year ago

Please check these items before go any further

Are you sure this is a bug?

Describe the bug

When the theme is used with only one language, the consent box doesn't work. Also, this error occurs.

Screenshot 2022-12-15 at 18 34 44

Expected Behavior

The consent box should work whether one language is used or more than one language is used.

Steps To Reproduce

  1. Delete the other language folders. (ja, pt)
  2. Delete _data/content/projects/ (ja.yml, pt.yml)
  3. Delete _data/lang/ (ja.yml, pt.yml)
  4. Delete _data/owner/ (ja.yml, pt.yml)
  5. Open _data/conf/main.yml
  6. Find language_switch_lang_list and set it to language_switch_lang_list: [en]
  7. Use bundle exec jekyll serve --watch --safe to run locally
  8. Open http://127.0.0.1:4000
  9. The consent box will not be shown.

Which browser have you used?

Which device have you used?

Anything else?

No response

MrGreensWorkshop commented 1 year ago

The problem, SlidingMsgBox were used for language_translation_offer_box feature and cookie consent box. But SlidingMsgBox was not included when single language is used.

MrGreensWorkshop commented 1 year ago

fixed with PR #135