owasp-noir / noir

Attack surface detector that identifies endpoints by static analysis
https://owasp.org/www-project-noir/
MIT License
551 stars 41 forks source link

Documentation - Add toggle for light/dark mode and custom theme #373

Closed hahwul closed 1 month ago

hahwul commented 1 month ago

https://just-the-docs.com/docs/customization/#color-schemes

<button class="btn js-toggle-dark-mode">Preview dark color scheme</button>
jtd.addEvent(toggleDarkMode, 'click', function() {
    if (jtd.getTheme() === 'dark') {
        jtd.setTheme('light');
        toggleDarkMode.textContent = 'Preview dark color scheme';
    } else {
        jtd.setTheme('dark');
        toggleDarkMode.textContent = 'Return to the light side';
    }
});

jtd.setTheme = function(theme) {
  var cssFile = document.querySelector('[rel="stylesheet"]');
  cssFile.setAttribute('href', '/assets/css/just-the-docs-' + theme + '.css');
}
hahwul commented 1 month ago

_sass/color_schemes/noir.scss

hahwul commented 1 month ago

Drop