Header Dark Mode

3 replies · opened Jan 15, 2024

Oozturk42Jan 15, 2024

I want a header that always appears in dark mode when I enter the site. What should I do?

SSemicolon WebSTAFFJan 16, 2024

Hello,

The Header appears to be Dark when Loading the Website. You can consider deleting the following JS Code from the Page in order to always keep the Header Dark:
[ch_pre type="js"]jQuery(document).ready(changeHeaderColor);

jQuery(window).on('resize',changeHeaderColor);

function changeHeaderColor(){

if (jQuery(window).width() > 991.98) {

	jQuery( "#header" ).hover(

		function() {

			if (!jQuery(this).hasClass("sticky-header")) {

				jQuery( this ).addClass( "hover-light" ).removeClass( "dark" ).addClass('not-dark');

			}

			jQuery( "#wrapper" ).addClass( "header-overlay" );

			SEMICOLON.Base.setBSTheme();

		}, function() {

			if (!jQuery(this).hasClass("sticky-header")) {

				jQuery( this ).removeClass( "hover-light" ).addClass( "dark" ).removeClass('not-dark');

			}

			jQuery( "#wrapper" ).removeClass( "header-overlay" );

			SEMICOLON.Base.setBSTheme();

		}

	);

}

};[/ch_pre]

This will definitely work fine. Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

Oozturk42Jan 16, 2024

Thanks for everythink

SSemicolon WebSTAFFJan 17, 2024

Very Happy to Help! :)

Please do let us know if we can help you with anything else.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard