Change colours on Consul site

I have just started testing Consul. I know how to customise text etc, but would like to know how to customise colours for my website (for instance, the bar with the Consul logo is now blue, but I want to change it to white and change the font color to purple)

How / where can I do this?

Hi, @Wouter_Splinter :smile:.

Currently the only way to customize colors is changing the code in the SCSS files. To change specific things, like the background of the header to white, you can add this code to the app/assets/stylesheets/custom.scss file:

.public > .wrapper > header,
.proposal-dashboard > header {
  .top-bar {
    background: $white;
  }
}

To change settings affecting several places, you can customize variables using the app/assets/stylesheets/_consul_custom_overrides.scss file. For instance, to change the general background color on every page to light yellow, write something like:

$body-background: #fdfdf6;

Hope that helps!

There are plans to add an interface so it’s easier customize colors; right now we don’t know whether we’ll have time to implement it during this year or not.

Hi, I changed the .scss files, but when I restart it does not update the colours. All the other things on the platform I can change, but how can I update the stylesheets?

Hi Wouter_Splinter,

It sounds like you were doing the changes directly on the production server code. If so, you would have to precompile application assets by hand and then restart the server. You can do so with the following command from the server /home/deploy/consul folder:

RAILS_ENV=production rake assets:precompile

However, we do not recommend applying changes directly to production server code as it would be easy to find more issues like this one. If you installed CONSUL using the installer, you could deploy your changes more safely and simply using Capistrano, configured on the server during the installation process. You can use it to deploy new application versions by running a simple command from your development machines.

cap production deploy

Here is the link to the documentation about Capistrano [1].

I hope it helps.

[1] https://github.com/consul/installer#deploys-with-capistrano

I managed to solve this, was an error in updating / git commit on my side

Same here.

If I use:

RAILS_ENV=production rake assets:precompile

error

You have already activated rake 13.0.1, but your Gemfile requires rake 13.0.6. Prependingbundle execto your command may solve this.

comes up. If I use

RAILS_ENV=production bundle exec rake assets:precompile

message

Command 'bundle' not found, but can be installed with: ...

appears.

What would be the best way to solve this?

Hi, @Jan :smile:.

IMHO Integrating the assets precompilation in your deployment is the way to go. If you’re using Capistrano, then the assets are automatically precompiled while deploying.

If you’re manually compligin the assets (which we don’t recommend because it’ll increase the chance of things getting out of control), the command to precompile would probably be RAILS_ENV=production bin/rake assets:precompile.