Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to customize styles #475

Closed
loleg opened this issue Jan 19, 2024 · 3 comments
Closed

How to customize styles #475

loleg opened this issue Jan 19, 2024 · 3 comments
Assignees
Labels
frontend Pull requests that update Javascript code

Comments

@loleg
Copy link
Contributor

loleg commented Jan 19, 2024

If we can apply custom CSS to the server, we can more easily see which is dev, which is stage, which is demo. And also for customers it will be interesting to know that they can apply more branding (fonts, colors, icons) to their whitebox Proxeus instance.

There are a couple of simple and reliable ways to do this:

  1. An environment variable that specifies an external CSS file with overrides
  2. A new parameter that is added to the CLI/JSON/database configuration settings
  3. Dynamic configuration #473

A more sophisticated way, would be to extend the UI framework with theming capabilities, e.g. using Vuetify.

This was originally requested in #153

@loleg loleg mentioned this issue Jan 19, 2024
3 tasks
@loleg
Copy link
Contributor Author

loleg commented Jan 22, 2024

After having a discussion of the Dynamic configuration proposal, my decision is that this should be a standard parameter, i.e. documented here and in settings.go.

Since including HTML and JS poses additional security risk, and our need here is at this point only aesthetic, I would suggest we go for the second option - a parameter called ExternalStylesUrl which specifies the location of a CSS stylesheet file that is embedded in the HEAD of the page after the standard stylesheets.

This will allow the administrator to override the default look & feel (even some of the text using :content), even for multiple sites from the same location, host the modifications in revision control if they want, and use a good editor to do so.

@loleg loleg added the frontend Pull requests that update Javascript code label Jan 22, 2024
@loleg
Copy link
Contributor Author

loleg commented Jun 21, 2024

As a next step, it would be good to share typical CSS paths, give some examples in the documentation. I am therefore leaving this ticket open until we do that.

Note that in the future, we should also get back to #153 to potentially pre-configure some CSS customizations in a user-accessible way.

@loleg
Copy link
Contributor Author

loleg commented Jul 19, 2024

Thanks, great solution here!

@loleg loleg closed this as completed Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend Pull requests that update Javascript code
Projects
Development

No branches or pull requests

2 participants