-
Notifications
You must be signed in to change notification settings - Fork 447
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
Add default styling for HTML galleys #3691
Comments
I can be assigned to this issue. |
It was probably just because it's a template that doesn't show the "normal" website layout. But you could probably add it back in, or consider using a unique context so that it's easy to add styles of JS specifically to this page:
|
@NateWr |
@Vitaliy-1 The HTML Galley plugin is part of the OJS repository, rather than a separate submodule. So you can make changes to that and put them all in the same commit/PR to OJS. 👍 |
ThemePlugin class is inside pkp-lib submodule and I didn't make submodule update before. What is the algorithm here? |
Ok, this is always a bit of a hurdle the first time you do it. So let's suppose the following (adjust according to your branch names):
Do the following:
The syntax of the commit message is:
That tells the testing suite to check out your repository and branch when running the tests. Let me know if you have any difficulties. 🤞 |
Hmm, don't know git well. Right now |
You'll want to have
If in this series, after doing
The second one can happen if you use If that doesn't solve it, let me know and we can do a google hangout. |
I left a couple comments on the PRs. In the future, when you're ready for another look, leave a comment here so I know to check the PRs again. Also, we like to link to the PRs like this so it's easy for the reviewer to find. PRs: |
@NateWr |
Looks great, @Vitaliy-1! I'm happy to merge. I left one comment but otherwise just needs a rebase and it's ready to go. 👍 |
@NateWr Thanks for the review and help. I've updated this one and pkp/lib sudmodule in ojs rep. |
It looks like you've still got a merge conflict. This can happen if either ojs or pkp-lib need a rebase. My usual approach is:
Let me know if you want cmd-by-cmd on any of that. |
#3691 Support default stylesheet for HTML galleys
pkp/pkp-lib#3691 Support default stylesheet for HTML galleys
@Vitaliy-1 a reminder that I'm still hoping you'll take a quick look at the code here to make sure it looks alright. |
Yep, the code looks perfect and it works as expected. My only concern for the hook was that it can be used later by plugins to add data to HTML from OJS. |
STABLE: #3691 Add default HTML galley styles
STABLE: pkp/pkp-lib#3691 Add default HTML galley styles
STABLE: pkp/pkp-lib#3691 Support default HTML galley styles
#3691 Move HTML galley style injection to standalone method
pkp/pkp-lib#3691 Fix HTML galley display and support default HTML gal…
pkp/pkp-lib#3691 Move default html galley styles from hook to method
👍 Thanks! I thought about that, but I think for themes we'll want to wrap this into the Theme API methods for |
Hello, Is this feature now available? I am running version 3.1.1.4 - thanks! |
@schlattk I believe this is only available in 3.1.2+. |
ok thanks @NateWr |
#3691 default CSS for HTML galleys for stable-3.1.1
pkp/pkp-lib#3691 default CSS for HTML galleys for stable-3.1.1
Looks like this should be available by now. Correct? Any hints how this can be used? Is that documented somewhere? |
@denismaier good point, this should be documented as part of the Theme API. Use it by adding a style to the context $this->addStyle('htmlGalley', 'path/to/galley.css', ['contexts' => 'htmlGalley']); |
@NateWr thanks, I'll have a look. Where should you store the stylesheet? |
With your custom theme plugin. |
Ok. And how do you tefetence the stylesheet in the html? |
You don't. It will be automatically injected into the |
I see. For testing and development purposes I nevertheless have a link to a stylesheet in the html. Do I have to remove that before uploading? Or will that just be ignored or overriden? |
This feature injects a |
I've now finally managed to try this---without much success though. Here's what I've done:
Now, this should use my css for the galley, right? But this doesn't happen. Moreover, upon investigating the source code I found no traces of an injected What am I missing? |
This works from OJS 3.1.2+, I've also backported it to the OJS 3.1.1 stable branch but as far as I remember it was after the release of OJS 3.1.1.4. |
That was it. Thanks. |
The new public method in the
ThemePlugin
class will allow the user to upload CSS/LESS as a default styling for the HTML galley.Jan 7, 2019: This has been implemented for OJS. It still needs to be ported for use in OMP, and the hook names updated appropriately. It also needs to be documented in the PKP Theming Guide.
The text was updated successfully, but these errors were encountered: