I’m graphic designer and I’m working on a new theme for OJS 3.1.X, but i would like it compatible with JATS Parser plugin (from @Vitaliy)
Does anybody knows:
- which themes are compatibles with JATS Parser?
- where can I found some demos of these themes?
thanks a lot in advance
@NateWr @Vitaliy @asmecher any comments about this?
Hi @psanso and @marc,
JATS Parser Plugin works on Bootstrap but doesn’t download it itself, so any theme that uses Bootstrap would support this plugin, e.g. Classic, Immersion, Health Science theme. If the aim is to show JATS as HTML on article landing page rather than on separate galley page, the solution is more complex, example: GitHub - Vitaliy-1/oldGregg: Theme for OJS 3 with Bootstrap 4
Thanks for your answer and sorry for the lag.
Yes, the idea was showing JATS as HTML like you are doing in oldGregg.
I always thought it was the aim of the JATS Parser… but looks like I’m missing something here. I mean, in my mind JATS Parser is doing the transformation work and add extra templates so every theme was able to show new templates with it’s own taste (css and so on)… keeping presentation and logic layers separated.
Is not the way it works?
It’s time to develop our own institutional theme and we don’t know what theme to use as a base.
JATS Parser plugin v 1.0 had added Smarty templates. But it’s not the case for the v. 2.0 anymore. It is possible to return to this practice, I need more consideration here (pros and cons).
The input for JATS Parser is JATS XML. The intermediate output is a representation of the article in the plain PHP objects. The output is PHP DOMDocument, where I retrieve HTML with a simple method. I need this format because it’s passed to the TCPDF library for additional conversion to PDF.
So, if someone needs Smarty templates rather than DOMDocument, inside main theme class it should be something like:
require_once __DIR__ . '/path/to/jatsParser/library/vendor/autoload.php';
use JATSParser\Body\Document as JATSDocument;
* @var $jatsDocument JATSDocument object representation of JATS XML document
$jatsDocument = new JATSDocument("example.xml");
* @var $smarty TemplateManager
All content from the $jatsDocument could be than in the Smarty template retrieved with setters.
Does it make sense?
Any theme or child theme that uses Bootstrap 4.1+ is appropriate. I’ll definitely rewrite the code without Bootstrap some time in the future. From the official themes, it can be Classic, HealthSciences and Immersion theme. If you like another one, simply create a child theme and add Bootstrap’s JS and CSS (or SCSS).
I have added links to the themes I’ve mentioned: Theme gallery for OJS 3.x - #4 by marc
But they should be available and through Plugin Gallery.
We use your OldGregg theme on a journal and implementing rendered JATS as HTML (here is the journal https://myjurnal.poltekkes-kdi.ac.id/index.php/HIJP/article/view/478). The feature is so great, especially for expanding and responsive figure.
The question is, on our other journal, we use Health Sciences theme (here is the journal https://myjurnal.poltekkes-kdi.ac.id/index.php/jippm/article/view/493). Is there a way to make the JATS as HTML view as great as in OldGregg for this Health Sciences theme?
thank you so much for the reply
I’m glad that you like it
Most CSS and JS for the HTML are generated on the theme side, except for some basic styling. In OldGregg theme, styling for this page is here: https://github.com/Vitaliy-1/oldGregg/blob/main/resources/less/pages/article.less and JS here: https://github.com/Vitaliy-1/oldGregg/blob/main/resources/js/article.js
Other themes don’t implement this by default. It shouldn’t be hard to adapt this for someone who knows front-end basics and even make a better design.