onVanillaReady((vanilla) => {
const themeHeader = document.getElementById('themeHeader').shadowRoot;
const customMessageContainer = themeHeader.getElementById('customMessage');
const path = window.location.pathname;
var message;
switch (path) {
case '/':
message = 'Welcome to the community!';
break;
case '/profile':
message = 'To edit your profile, click on Edit';
break;
case '/discussions':
message = 'Please dialogue responsibly.';
break;
default:
'';
}
if (message) {
customMessageContainer.textContent = message;
customMessageContainer.style.display = 'block';
}
});