In Domain settings in config.json I can set a 'title'
If I replace the 'titlepicture' with my logo and want the text from title moved to the right a few spaces, adding leading spaces to field 'title' seems to be ignored.
So now my title overlays the logo.
I can't see if I can change the font colour of title...
Can leading spaces not be ignored please
I had exactly the same issue and just decided to not use any text along with a logo (that works for me because my company logo has my company name in it). But it would be nice to be able to correctly use text along with a logo like you are mentioning. I think a better option, instead of using spaces, would be for the text to always just start a few pixels or so to the right of the logo, if a logo is being used.
This is a workaround, but you could use leading non-breaking spaces with , normal spaces get treated as whitespace (because they are) nobreak spaces are not considered whitespace by the HTML renderer, so you can use them in their place.
It would be better to if MeshCentral would look for a CSS file in the meshcentral-data folder to support this kind of customization.
non-breaking spaces works thanks (as a workaround)
A issue arising from this, is that the TAB name in Chrome now says "&npsp; &npsp; &npsp; &npsp;...' although the customised logo looks fine.
I was going to use some other HTML tags to modify the font for the title on the web page.
Just made improvements around this, update to MeshCentral v0.4.5-v and you can use the new "titlehtml" domain value like this:
"domains": {
"": {
"titlehtml": "This is a <b>TEST</b>",
"title": "MyServerName",
"titlePicture": "title-server.png",
}
}
This should allow you to put the HTML you want in the title and still have a correct title in the browser tab. Let me know if this works for you.
The css didn't work for the new field value
I figured that I could just change as below, but that didn't work.
I'll dig a little deeper...
./node-modules/meshcentral/public/styles/style.css
float: left;
height: 66px;
color: #c8c8c8;
padding-left: 20px;
padding-top: 8px;
font-size: 46px;
font-family: Arial,Helvetica,sans-serif;
font-weight: bold;
}
to
float: left;
height: 66px;
color: #c8c8c8;
padding-left: 20px;
padding-top: 8px;
font-size: 46px;
font-family: Arial,Helvetica,sans-serif;
font-weight: bold;
}
So, I don't really want to add a margin/padding on the "titlehtml" because you should be able to write any HTML you like and not be constrained by existing CSS. For example:
"titlehtml": "<div style=\"height:66px;color:#c8c8c8;padding-left:14px;padding-top:8px;font-size:46px;font-family:Arial,Helvetica,sans-serif;font-weight:bold\">This is a test</div>"
This way you get all the flexibility. Let me know if that works for you.
Yes, that works thanks
Most helpful comment
This is a workaround, but you could use leading non-breaking spaces with
, normal spaces get treated as whitespace (because they are) nobreak spaces are not considered whitespace by the HTML renderer, so you can use them in their place.It would be better to if MeshCentral would look for a CSS file in the
meshcentral-datafolder to support this kind of customization.