ثيم ليلة الفضائيين - ثيم داكن مجاني لـ Discourse

After few days I can confirm that this bug is fixed by deleting href="#" from the Html code, e.g.

  <a class="theme-switcher-attr theme-switcher-light">Light</a>
  <a class="theme-switcher-attr theme-switcher-dark">Dark</a>

If anyone is interested I changed the position and shape of the buttons making them “fixed” on the page, so users can change from dark to light (or viceversa) without going back to top.

On CSS I add:

#top-navbar {
    position: fixed;
    top: 90px;
    left: 0;
    z-index: 90000;
    width: 70px;
    overflow: hidden;
    margin: 0;
    text-align: center;
    box-shadow: 0px 0px 4px #070708;
    border-radius: 0px 10px 10px 0px;
}

according to my Html code.

and this line (both here .theme-switcher-light and here .theme-switcher-dark) to make the round buttons
border-radius: 100%;

In Html/Top:

<div id="top-navbar">
  <span class="theme-switcher">Tema:</span>
  <a class="theme-switcher-attr theme-switcher-light"><i class="fa fa-sun-o fa-lg"></i></a>
  <a class="theme-switcher-attr theme-switcher-dark"><i class="fa fa-moon-o fa-lg"></i></a> 
</div>

I preferred to use the FontAwesome’s icons instead of a text for buttons.

3 إعجابات