Skip to content
This repository has been archived by the owner on Feb 19, 2021. It is now read-only.

Override webserver CSS? #371

Closed
SummittDweller opened this issue Jun 26, 2018 · 5 comments
Closed

Override webserver CSS? #371

SummittDweller opened this issue Jun 26, 2018 · 5 comments

Comments

@SummittDweller
Copy link

SummittDweller commented Jun 26, 2018

Is it possible to easily override the CSS of the webserver? Some of the default colors are hard for me to see clearly. I need a high-contrast display to be comfortable.

I did find the paperless.css file, added some overrides, many with !important qualifiers, and restarted my Docker containers, but the changes didn't show up. I also rebuilt the images but still no change.

Any suggestions? Thanks.

@SummittDweller
Copy link
Author

SummittDweller commented Jun 27, 2018

Ok, I found 'custom.css' and thought the overrides there were working once I rebuilt the webserver image, but I was wrong. The changes I made to 'paperless.css' did impact the ../admin/documents/document page after rebuilding and flushing my browser cache. However, the same CSS that appears on other pages is NOT changed as I thought it might be.

I also found and changed the default sort order (preferred '-added' over '-created') in admin.py and that's working nicely.

@SummittDweller
Copy link
Author

So now I see that 'paperless.css' is apparently only loaded for the 'document' and 'reminder' pages? Was it intentionally omitted from the other pages? I don't understand the structure of the code well enough to know where/how to add it to the other pages. Any suggestions?

The applicable block of code appears to be ...

class Media:
    css = {
        "all": ("paperless.css",)
    }

@danielquinn
Copy link
Collaborator

Sorry it's taken me so long to get back to you on this. I've been working on getting my visa in this country worked out.

There's currently no "global" CSS changes because they hadn't been requested yet, but your use case is as good a reason as any to have one, so I just added this feature to the master branch. To make use of it, do a git pull, add a file called overrides.css to the root of your media directory, and restart the Paperless webserver. Anything you put in there will affect the entire site.

@danielquinn
Copy link
Collaborator

I'm going to close this issue now, but if you think we can do more for this use case, just re-open it and let me know.

@SummittDweller
Copy link
Author

Thanks Daniel and best wishes on the visa. I have a week off to work on things like this so I'll give it a try in the next day or two. I don't anticipate needing anything more related to this but if something comes up I'll post here. Take care.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants