Hi, I moved to another demo, just to compare it to my other bugs, I found,
this time I found the bugs and fixed them
I am running angular with typescript
I had to move the file: style.css to the assets folder, I was getting warning in the console:
Refused to apply style from.. 'because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
as you can see here: https://stackoverflow.com/questions/48248832/stylesheet-not-loaded-because-of-mime-type one of the solutions was to change the location of the folder to the vendor.in module.header, I add this lines:
let elHeader = core.getVars.elHeader;
if (!elHeader) {
return;
}in module.menu, I changed this lines:
if (core.getVars.elHeader && core.getVars.elHeader.querySelectorAll('.container-fullwidth').length > 0 ) {
document.querySelectorAll('.mega-menu:not(.mega-menu-full):not(.mega-menu-small) .mega-menu-content').forEach( el => el.style.width = headerWidth + 'px' );
}document.querySelectorAll('.mega-menu:not(.mega-menu-full):not(.mega-menu-small) .mega-menu-content, .top-search-form').forEach( el => el.style.width = headerWidth + 'px' );
if (core.getVars.elHeader && core.getVars.elHeader.classList.contains('full-header') ) {
document.querySelectorAll('.mega-menu:not(.mega-menu-full):not(.mega-menu-small) .mega-menu-content').forEach(el => el.style.width = headerWidth + 'px');
}
if (core.getVars.elHeader && core.getVars.elHeader.classList.contains('floating-header') ) {
let floatingHeaderPadding = getComputedStyle(document.querySelector('#header')).getPropertyValue('--cnvs-header-floating-padding');
document.querySelectorAll('.mega-menu:not(.mega-menu-full):not(.mega-menu-small) .mega-menu-content').forEach(el => el.style.width = (headerWidth + (Number(floatingHeaderPadding.split('px')[0]) *2)) + 'px');
}
also I find out that I need to add some js files besides the functions.js and quary.js, not sure where I suppose to learn about it, other than the console error... so you need to add it to the documentation - which JS is needed for each deomos.
I don't understand why the generator limit me.. seems very stupid, since it suppose to make my life easy.
The generator did not copy some important files:logo.png and logo-dark.png (as far as I remember)
