Skip to content
Snippets Groups Projects
Commit 6f4e9be9 authored by Jerome Chauveau's avatar Jerome Chauveau
Browse files

template complètement autonome, plus besoin de hook js tordus + nettoyage divers

parent 8c56169a
Branches
No related tags found
No related merge requests found
......@@ -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'));
}
......@@ -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
......
window.addEventListener('DOMContentLoaded', (event) => {
//omp specific, tests
document.querySelectorAll(".page_book .files .cmp_download_link").forEach((link) => {
link.setAttribute('href',link.getAttribute('href').replace('view','viewhtml'))
})
});
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();
......
......@@ -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;
......@@ -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;*/
/*}*/
*{
......@@ -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;
......@@ -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;
......@@ -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{
......@@ -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{
......@@ -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;
}
......
{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>*}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment