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

The cookie settings button is not visible even though cookie_settings_button_enabled is true #104

Closed teshiba closed 2 years ago

teshiba commented 2 years ago

Please check these items before go any further

Are you sure this is a bug?

Describe the bug

If color_scheme_switch_side_nav is false, side-nav-bottom-buttons-container is not displayed.

https://github.com/MrGreensWorkshop/MrGreen-JekyllTheme/blob/570665d929690e5c0a3b01c24a5079ec6bc3324a/_includes/default/nav/navigation-side-nav-bottom-buttons.html

Therefore even though cookie_settings_button_enabled is true, the cookie setting button is also not displayed.

Expected Behavior

If color_scheme_switch_side_nav is true or cookie_settings_button_enabled is true then side-nav-bottom-buttons-container is visible.

image

Steps To Reproduce

  1. Set color_scheme_switch_side_nav to false in _data\conf\main.yml

  2. Run bundle exec jekyll serve --baseurl "" on a terminal.

  3. browse http://127.0.0.1:4000/ image

  4. It can not display the cookie settings button.

Which browser have you used?

Which device have you used?

Anything else?

In the _includes\default\nav\navigation-side-nav-bottom-buttons.html change the code as follows. It works I expected.

-{% if color_scheme_switch_enabled == true %}
+{% if color_scheme_switch_enabled == true or cookie_settings_button_enabled == true %}
  <div class="side-nav-bottom-buttons-container">

I have already fixed it so that I can pull request.

MrGreensWorkshop commented 2 years ago

Hi, you are right. Thank you, PR that please. How did I miss that..

MrGreensWorkshop commented 2 years ago

merged, Thanks again.