Can't find where to include CSS


#1

Hello!

I am trying to add our company’s standard navbar to Grafana. I am NOT looking to overwrite the current Grafana navbar. I am simply wanting to add a little button that when clicked pulls down our company’s navbar.

I am having a difficult time trying to get the css to load. I have tried placing the file in the same location as my JS file in /public/my_navbar and then link to it in index.html, but upon build, I find that the css is not to be found anywhere in /public_gen/my_navbar, although my JS file is there.

I have also tried including it with the other sass files and then importing it in _grafana.scss. No luck there. I am at a loss here on what to do.

Thank you!


#2

Read the building from source guide, you need to modify templates and css and do a custom build


#3

Thank you for the reply. I have already read and followed that particular guide. I have been altering the source code and building the front end locally. I have successfully imported my JS script into the index.html found within public/views/

It is my css styles and images that I am having problems with getting to render. I can see that my css and images are being served by localhost:3000/public/css/my-styles.css, for example. But they are never applied.

I also have them included in the index.html template in basically the same manner as my JS script which is successfully running, but of course, with the appropriate tag.

I am fairly new to front end development. But I do feel like I should have enough skills to pull this off =P
Any guidance would be very much appreciated.


#4

include them in grafana.scss