ProxeusApp / proxeus-core

Create blockchain-ready document workflows, own your data.
https://proxeus.org
GNU General Public License v3.0
14 stars 13 forks source link

How to customize styles #475

Open loleg opened 5 months ago

loleg commented 5 months ago

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. 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 commented 5 months ago

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 commented 2 weeks ago

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.