pkp / pkp-lib

The library used by PKP's applications OJS, OMP and OPS, open source software for scholarly publishing.
https://pkp.sfu.ca
GNU General Public License v3.0
297 stars 442 forks source link

Ability to upload/edit articles stylesheet through dashboard #6015

Open RewindLife opened 4 years ago

RewindLife commented 4 years ago

It would be great to be able to upload the HTML article view stylesheet used by Classic Theme through the dashboard, similar to the way the OJS website stylesheet is uploaded.

It seems currently the only way to update this stylsheet file is for a system admin to replace it directly on the server.

I am talking about the file located here: .../plugins/themes/classic/templates/plugins/generic/htmlArticleGalley/css/default.css

Thank you.

Vitaliy-1 commented 4 years ago

Hi @RewindLife,

I think it's better to be done from OJS core or HTML Galley Plugin. In this case, we can avoid duplicating the code in all other themes.

NateWr commented 4 years ago

Is the goal to replace the default article CSS with a custom CSS stylesheet? Or to be able to add more CSS code to override the existing CSS?

aupress commented 4 years ago

I would say, to be able to overwrite the theme's default article classes and add new ones when needed.

NateWr commented 4 years ago

Thanks @aupress. So it sounds like what you need is either a text field or a file upload field that would allow you to provide CSS code that is only loaded on the HTML article view page.

A text field is easier in that a theme could add that as an option right now without much work. Currently there's no support file theme options that support file uploads, but that may change in the future.

aupress commented 4 years ago

That's exactly what we'd like to see! Thank you for looking into it.