Okay
  Public Ticket #1991278
Dark Mode
Closed

Comments

  • KBock started the conversation

    In the backend it is possible to set the template to white or black as a main color - could you point me to the two css files for that? 
    I would like to insert a script in my page which uses one or another based on user timezone to show light or darkmode when necessary.

    Best Regards

  •  1,974
    Support replied

    Hello Kevin

    the background color is set in in /js/script.js with this piece of code:

    if ($("#page-content").hasClass("light-content")) {

        $("main, nav").css('background-color', '#0f1010');
        $('#magic-cursor').addClass('light-content');
        if( $('#hero').length > 0 ){
        if( $('#hero').hasClass("has-image")) {
            $("header").css('background-color', 'transparent');
        } else {
            $("header").css('background-color', '#0f1010');
       }
     }
    } else {
        $("main").css('background-color', '#fff');
        $("nav").css('background-color', '#0f1010');
        $('#magic-cursor').removeClass('light-content');
        if( $('#hero').hasClass("has-image")) {
           $("header").css('background-color', 'transparent');
        } else {
           $("header").css('background-color', '#fff');
      }
    }


    Thank you.

    Clapat Support

    https://www.clapat.com/

    Review Envato Item Support Policy

  • KBock replied

    Thank you very much for taking your time to point this out!

    Your support is really great.

    Best regards

  •  1,974
    Support replied

    Hello, we appreciate your rating Kevin.

    Thank you.

    Clapat Support

    https://www.clapat.com/

    Review Envato Item Support Policy