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

Customize the ERC View Theme to Match the Rest of the OJS Theme #6

Closed
4 tasks done
tomniers opened this issue Apr 16, 2021 · 2 comments
Closed
4 tasks done

Customize the ERC View Theme to Match the Rest of the OJS Theme #6

tomniers opened this issue Apr 16, 2021 · 2 comments
Assignees

Comments

@tomniers
Copy link
Collaborator

tomniers commented Apr 16, 2021

The idea is to reuse the theme used in OJS, in the o2r galley. Of course it would be nice to adopt as much as possible, but the goal of this issue is that the user gets a few colors suggested for the o2r galley in the plugin settings, selects one and it is then applied accordingly in the o2r galley.

related to o2r-project/o2r-UI#197

@tomniers
Copy link
Collaborator Author

tomniers commented Jun 11, 2021

Maybe the option would be possible to access e.g. the header color that is currently used by the current theme. So you have to look which theme is currently activated by the user (so look in the database in the table site_settings for the themePluginPath) and then find out the base color accordingly. This should not be a problem for one theme, but if variables and structure differ in the different themes it could be problematic.

A concrete example would probably be to get the @bg-base: variable in the default theme, which is already customizable by a function in the Website Settings in OJS (https://github.com/pkp/ojs/blob/c192565e655110850fe30378652aa58fbd292502/plugins/themes/default/DefaultThemePlugin.inc.php#L136). This will change at least the background-color, which is usually available in every theme. But I got the impression that the background-color variable is always at different places/ files, so it could be difficult to find this in a fixed place, you could of course search for it and if not findable use an default value.

Thus, for now, the decision is that the user sets the color himself in the settings.

@tomniers
Copy link
Collaborator Author

tomniers commented Aug 2, 2021

In OJS there is no general baseColour that can be used for this purpose. It is only defined per theme plugin by some plugins, but NOT all (compare comment in the PKP Community Forum). So you can't always refer to this colour. So the procedure now is to use the baseColour of the default theme plugin as a basis (if available and no other theme plugin is installed), otherwise the predefined default color of OJS. But the user has the possibility to change the main color of the ERC Galley in the ojs-erc-plugin settings. Unfortunately, the predefined colorPicker from OJS cannot be used (compare comment in the PKP Community Forum), so we use the predefined one from HTML5. The corresponding main implementation can be found here:

@tomniers tomniers closed this as completed Aug 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants