Loading XML2HTMLPlugin.php +6 −2 Changes for XML2HTMLPlugin.php: 6 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -72,8 +72,9 @@ class XML2HTMLPlugin extends GenericPlugin $xmlFilePath, $this->getRequest(), $op); $baseUrl = $this->getRequest()->getBaseUrl() . '/' . $this->getPluginPath(); $templateMgr->addStyleSheet('xml2htmlStyles', $baseUrl . '/resources/styles/article.css'); $templateMgr->addJavaScript('xml2htmlJavascript', $baseUrl . '/resources/javascript/xml_2_html.js'); // $templateMgr->addStyleSheet('xml2htmlStyles', $baseUrl . '/resources/styles/xml_2_html.css'); // $templateMgr->addJavaScript('xml2htmlJavascript', $baseUrl . '/resources/javascript/xml_2_html.js'); $templateMgr->assign('assetsPath',$this->getPluginAssetsPath($this->getRequest())); $templateMgr->assign('text', $html); $templateMgr->display($this->getTemplateResource('HTMLGalleyView.tpl')); } Loading Loading @@ -101,6 +102,9 @@ class XML2HTMLPlugin extends GenericPlugin return 'This plugin transform XML articles to HTML'; } function getPluginAssetsPath($request) { return $request->getBaseUrl() . '/' . $this->getPluginPath() . '/resources/'; } static function transform( string $xmlFilePath Loading resources/javascript/omp_link_hook.js −10 File deleted. Show changes resources/javascript/xml_2_html.js +10 −10 Changes for resources/javascript/xml_2_html.js: 10 added lines, 10 removed lines. Original line number Diff line number Diff line window.addEventListener('DOMContentLoaded', (event) => { //@todo : how to remove it from ojs template ? document.querySelectorAll("link").forEach((e) => { let href = e.getAttribute('href'); //@todo : removes 2 last tests (pdn-pp tests only) if (href.indexOf('name=stylesheet') > 0 || href.indexOf('name=less') > 0 || href.indexOf('oldGregg') > 0) e.remove(); }); //move galley links if(document.querySelector("div.item.galleys")) document.querySelector(".left-contents").prepend(document.querySelector("div.item.galleys")) // document.querySelectorAll("link").forEach((e) => { // let href = e.getAttribute('href'); // //@todo : removes 2 last tests (pdn-pp tests only) // if (href.indexOf('name=stylesheet') > 0 || href.indexOf('name=less') > 0 || href.indexOf('oldGregg') > 0) // e.remove(); // }); // // //move galley links // if(document.querySelector("div.item.galleys")) // document.querySelector(".left-contents").prepend(document.querySelector("div.item.galleys")) //footnotes binding bindFootnotes(); Loading resources/styles/article.css→resources/styles/xml_2_html.css +26 −25 Changes for resources/styles/xml_2_html.css: 26 added lines, 25 removed lines. Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ --dark-theme-bg: #22272e; --dark-theme-txt: #adbac7; --grey-color: #777; --nav-height: 4em; /*--nav-height: 4em;*/ --third-color : #0a84ff; --right-width: 35%; --btn-tabs-height: 40px; Loading @@ -10,17 +10,17 @@ /** temp addons (if jatsParser enabled)*/ .jatsParser__meta, #jatsParserFullText > h2, #jatsParserFullText > p, .usernav,.journal_branding, .jatsParser__cover-wrapper, nav li.dropdown, button.navbar-toggler { display: none; } /*.jatsParser__meta, #jatsParserFullText > h2, #jatsParserFullText > p, .usernav,.journal_branding, .jatsParser__cover-wrapper,*/ /*nav li.dropdown, button.navbar-toggler {*/ /* display: none;*/ /*}*/ /***************************************/ /* hides pkp ojs stuff */ #navigationUserWrapper, section.item, .cmp_skip_to_content, .pkp_navigation_primary_row, .pkp_site_name_wrapper, .entry_details, .pkp_brand_footer{ display:none; } /*#navigationUserWrapper, section.item, .cmp_skip_to_content, .pkp_navigation_primary_row, .pkp_site_name_wrapper,*/ /*.entry_details, .pkp_brand_footer{*/ /* display:none;*/ /*}*/ *{ Loading @@ -29,19 +29,19 @@ nav li.dropdown, button.navbar-toggler { padding: 0; } .pkp_structure_main::before, .pkp_structure_main::after{ background: none; } /*.pkp_structure_main::before, .pkp_structure_main::after{*/ /* background: none;*/ /*}*/ .pkp_structure_content, .pkp_structure_main, .obj_article_details .main_entry{ margin: 0; padding: 0; width: auto; } /*.pkp_structure_content, .pkp_structure_main, .obj_article_details .main_entry{*/ /* margin: 0;*/ /* padding: 0;*/ /* width: auto;*/ /*}*/ /*********/ nav { height: var(--nav-height); /*height: var(--nav-height);*/ position: fixed; width: 100%; border-bottom : 1px solid black; Loading @@ -62,8 +62,9 @@ nav li { #mode-color-btns{ position: fixed; top:15px; right: 15px; top:5px; right: 5px; z-index:10; } #sun, #moon{ cursor: pointer; Loading @@ -82,7 +83,7 @@ body.dark{ .wrap { /*padding-top: calc(var(--nav-height));*/ font-family: "Noto Sans",-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif; border-top: 1px solid black; /*border-top: 1px solid black;*/ } section.back{ Loading @@ -97,9 +98,9 @@ section.back{ .left-contents { width: 65%; overflow-y: auto; max-height: calc(100vh - var(--nav-height)); max-height: 100vh;/*calc(100vh - var(--nav-height));*/ scrollbar-color: var(--third-color) var(--third-color); margin-top: var(--nav-height); /*margin-top: var(--nav-height);*/ } .article-wrap{ Loading @@ -112,10 +113,10 @@ section.back{ width: var(--right-width); position: fixed; right:0px; top: calc(var(--nav-height)); top: 0;/*calc(var(--nav-height));*/ overflow-y: auto; scrollbar-width: thin; height: calc(100vh - var(--nav-height)); height: 100vh;/*calc(100vh - var(--nav-height));*/ border-left: 1px solid black; } Loading templates/HTMLGalleyView.tpl +24 −3 Changes for templates/HTMLGalleyView.tpl: 24 added lines, 3 removed lines. Original line number Diff line number Diff line {include file="frontend/components/header.tpl"} <div> {*{include file="frontend/components/header.tpl"}*} {*<div class="page">*} {* {$text}*} {*</div>*} {*{include file="frontend/components/footer.tpl"}*} <!DOCTYPE html> <html lang="{$currentLocale|replace:"_":"-"}" xml:lang="{$currentLocale|replace:"_":"-"}"> <head> <meta charset="{$defaultCharset|escape}"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title> {$currentContext->getLocalizedName()} </title> <link rel="stylesheet" type="text/css" href="{$assetsPath}/styles/xml_2_html.css"> <script src="{$assetsPath}/javascript/xml_2_html.js"></script> </head> <body> <div class="page"> {$text} </div> {include file="frontend/components/footer.tpl"} </body> </html> {*<script src="{$pluginLensPath}/lens.js"></script>*} Loading
XML2HTMLPlugin.php +6 −2 Changes for XML2HTMLPlugin.php: 6 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -72,8 +72,9 @@ class XML2HTMLPlugin extends GenericPlugin $xmlFilePath, $this->getRequest(), $op); $baseUrl = $this->getRequest()->getBaseUrl() . '/' . $this->getPluginPath(); $templateMgr->addStyleSheet('xml2htmlStyles', $baseUrl . '/resources/styles/article.css'); $templateMgr->addJavaScript('xml2htmlJavascript', $baseUrl . '/resources/javascript/xml_2_html.js'); // $templateMgr->addStyleSheet('xml2htmlStyles', $baseUrl . '/resources/styles/xml_2_html.css'); // $templateMgr->addJavaScript('xml2htmlJavascript', $baseUrl . '/resources/javascript/xml_2_html.js'); $templateMgr->assign('assetsPath',$this->getPluginAssetsPath($this->getRequest())); $templateMgr->assign('text', $html); $templateMgr->display($this->getTemplateResource('HTMLGalleyView.tpl')); } Loading Loading @@ -101,6 +102,9 @@ class XML2HTMLPlugin extends GenericPlugin return 'This plugin transform XML articles to HTML'; } function getPluginAssetsPath($request) { return $request->getBaseUrl() . '/' . $this->getPluginPath() . '/resources/'; } static function transform( string $xmlFilePath Loading
resources/javascript/xml_2_html.js +10 −10 Changes for resources/javascript/xml_2_html.js: 10 added lines, 10 removed lines. Original line number Diff line number Diff line window.addEventListener('DOMContentLoaded', (event) => { //@todo : how to remove it from ojs template ? document.querySelectorAll("link").forEach((e) => { let href = e.getAttribute('href'); //@todo : removes 2 last tests (pdn-pp tests only) if (href.indexOf('name=stylesheet') > 0 || href.indexOf('name=less') > 0 || href.indexOf('oldGregg') > 0) e.remove(); }); //move galley links if(document.querySelector("div.item.galleys")) document.querySelector(".left-contents").prepend(document.querySelector("div.item.galleys")) // document.querySelectorAll("link").forEach((e) => { // let href = e.getAttribute('href'); // //@todo : removes 2 last tests (pdn-pp tests only) // if (href.indexOf('name=stylesheet') > 0 || href.indexOf('name=less') > 0 || href.indexOf('oldGregg') > 0) // e.remove(); // }); // // //move galley links // if(document.querySelector("div.item.galleys")) // document.querySelector(".left-contents").prepend(document.querySelector("div.item.galleys")) //footnotes binding bindFootnotes(); Loading
resources/styles/article.css→resources/styles/xml_2_html.css +26 −25 Changes for resources/styles/xml_2_html.css: 26 added lines, 25 removed lines. Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ --dark-theme-bg: #22272e; --dark-theme-txt: #adbac7; --grey-color: #777; --nav-height: 4em; /*--nav-height: 4em;*/ --third-color : #0a84ff; --right-width: 35%; --btn-tabs-height: 40px; Loading @@ -10,17 +10,17 @@ /** temp addons (if jatsParser enabled)*/ .jatsParser__meta, #jatsParserFullText > h2, #jatsParserFullText > p, .usernav,.journal_branding, .jatsParser__cover-wrapper, nav li.dropdown, button.navbar-toggler { display: none; } /*.jatsParser__meta, #jatsParserFullText > h2, #jatsParserFullText > p, .usernav,.journal_branding, .jatsParser__cover-wrapper,*/ /*nav li.dropdown, button.navbar-toggler {*/ /* display: none;*/ /*}*/ /***************************************/ /* hides pkp ojs stuff */ #navigationUserWrapper, section.item, .cmp_skip_to_content, .pkp_navigation_primary_row, .pkp_site_name_wrapper, .entry_details, .pkp_brand_footer{ display:none; } /*#navigationUserWrapper, section.item, .cmp_skip_to_content, .pkp_navigation_primary_row, .pkp_site_name_wrapper,*/ /*.entry_details, .pkp_brand_footer{*/ /* display:none;*/ /*}*/ *{ Loading @@ -29,19 +29,19 @@ nav li.dropdown, button.navbar-toggler { padding: 0; } .pkp_structure_main::before, .pkp_structure_main::after{ background: none; } /*.pkp_structure_main::before, .pkp_structure_main::after{*/ /* background: none;*/ /*}*/ .pkp_structure_content, .pkp_structure_main, .obj_article_details .main_entry{ margin: 0; padding: 0; width: auto; } /*.pkp_structure_content, .pkp_structure_main, .obj_article_details .main_entry{*/ /* margin: 0;*/ /* padding: 0;*/ /* width: auto;*/ /*}*/ /*********/ nav { height: var(--nav-height); /*height: var(--nav-height);*/ position: fixed; width: 100%; border-bottom : 1px solid black; Loading @@ -62,8 +62,9 @@ nav li { #mode-color-btns{ position: fixed; top:15px; right: 15px; top:5px; right: 5px; z-index:10; } #sun, #moon{ cursor: pointer; Loading @@ -82,7 +83,7 @@ body.dark{ .wrap { /*padding-top: calc(var(--nav-height));*/ font-family: "Noto Sans",-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue",sans-serif; border-top: 1px solid black; /*border-top: 1px solid black;*/ } section.back{ Loading @@ -97,9 +98,9 @@ section.back{ .left-contents { width: 65%; overflow-y: auto; max-height: calc(100vh - var(--nav-height)); max-height: 100vh;/*calc(100vh - var(--nav-height));*/ scrollbar-color: var(--third-color) var(--third-color); margin-top: var(--nav-height); /*margin-top: var(--nav-height);*/ } .article-wrap{ Loading @@ -112,10 +113,10 @@ section.back{ width: var(--right-width); position: fixed; right:0px; top: calc(var(--nav-height)); top: 0;/*calc(var(--nav-height));*/ overflow-y: auto; scrollbar-width: thin; height: calc(100vh - var(--nav-height)); height: 100vh;/*calc(100vh - var(--nav-height));*/ border-left: 1px solid black; } Loading
templates/HTMLGalleyView.tpl +24 −3 Changes for templates/HTMLGalleyView.tpl: 24 added lines, 3 removed lines. Original line number Diff line number Diff line {include file="frontend/components/header.tpl"} <div> {*{include file="frontend/components/header.tpl"}*} {*<div class="page">*} {* {$text}*} {*</div>*} {*{include file="frontend/components/footer.tpl"}*} <!DOCTYPE html> <html lang="{$currentLocale|replace:"_":"-"}" xml:lang="{$currentLocale|replace:"_":"-"}"> <head> <meta charset="{$defaultCharset|escape}"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title> {$currentContext->getLocalizedName()} </title> <link rel="stylesheet" type="text/css" href="{$assetsPath}/styles/xml_2_html.css"> <script src="{$assetsPath}/javascript/xml_2_html.js"></script> </head> <body> <div class="page"> {$text} </div> {include file="frontend/components/footer.tpl"} </body> </html> {*<script src="{$pluginLensPath}/lens.js"></script>*}