Yii2 use different navbar background color for test and production installations

Viewed 255

Environment: CentOS 7, PHP 7.1.32, Yii 2.0.16

I want to set-up different background colors for the navbar in order to quickly see on which installation am I currently working: test or production. It happens that many times I work on both in parallel, testing stuff and I always need to look at the browser address bar to check where I am. It would be way faster to color-code the navbar.

I see that the default background color is set to #222 in the bootstrap/less/navbar.less file. Which do you think would be the most efficient way to specify different color for test and production?

1 Answers

I don't know if its THE most effective way or not, but I would handle it in the main layout file. assign a specific class to navbar if its in development mode, and override the css rule for the class in site.css (or whatever css file you have)

Related