-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
252 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
/** | ||
* @file styles/pages/page-view-html.less | ||
* | ||
* Copyright (c) 2014-2018 Simon Fraser University | ||
* Copyright (c) 2003-2018 John Willinsky | ||
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING. | ||
* | ||
* @brief Styles applying to the page for viewing HTML galley | ||
*/ | ||
|
||
|
||
// container | ||
|
||
.galley_view { | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
right: 0; | ||
bottom: 0; | ||
overflow-y: hidden; | ||
|
||
& iframe { | ||
width: 100%; | ||
height: 100%; | ||
border: none; | ||
padding-top: 30px; | ||
} | ||
} | ||
|
||
.header_view { | ||
background-color: @light-grey; | ||
position: relative; | ||
z-index: 2; | ||
} | ||
|
||
.header_view .return { | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
height: 30px; | ||
width: 30px; | ||
line-height: 30px; | ||
text-align: center; | ||
background-color: #10beca; | ||
|
||
&:before { | ||
content: "\f060"; | ||
display: inline-block; | ||
font: normal normal normal 14px/1 FontAwesome; | ||
color: white; | ||
} | ||
} | ||
|
||
.header_view .title { | ||
margin-left: 30px; | ||
padding-left: 10px; | ||
display: block; | ||
text-overflow: ellipsis; | ||
color: @black; | ||
height: 30px; | ||
line-height: 30px; | ||
max-width: 100%; | ||
overflow: hidden; | ||
white-space: nowrap; | ||
} | ||
|
||
.pkp_screen_reader { | ||
position: absolute !important; | ||
left: -5000px; | ||
} | ||
|
||
|
||
|
||
// inner HTML | ||
|
||
@media (min-width: 1200px) { | ||
.without_own_css body { | ||
padding-left: 15%; | ||
padding-right: 15%; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
templates/plugins/generic/htmlArticleGalley/css/default.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
p, h1, h2, h3, h4, h5, h6 { | ||
font-family: 'PT Serif', serif; | ||
line-height: 1.6; | ||
} | ||
|
||
p { | ||
font-size: 18px; | ||
} | ||
|
||
@media (min-width: 1200px) { | ||
body { | ||
padding-left: 20%; | ||
padding-right: 20%; | ||
} | ||
} | ||
|
||
@media (min-width: 992px) and (max-width: 1199px) { | ||
body { | ||
padding-left: 12%; | ||
padding-right: 12%; | ||
} | ||
} | ||
|
||
@media (min-width: 768px) and (max-width: 991px) { | ||
body { | ||
padding-left: 7%; | ||
padding-right: 7%; | ||
} | ||
} | ||
|
||
@media (max-width: 767px) and (max-width: 767px) { | ||
body { | ||
padding-left: 5px; | ||
padding-right: 5px; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
{** | ||
* plugins/generic/htmlArticleGalley/display.tpl | ||
* | ||
* Copyright (c) 2014-2018 Simon Fraser University | ||
* Copyright (c) 2003-2018 John Willinsky | ||
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING. | ||
* | ||
* Embedded viewing of a HTML galley. | ||
* @uses $boolEmbeddedCss bool is true if HTML galley has attached CSS file | ||
*} | ||
<!DOCTYPE html> | ||
<html lang="{$currentLocale|replace:"_":"-"}" xml:lang="{$currentLocale|replace:"_":"-"}"> | ||
{translate|assign:"pageTitleTranslated" key="article.pageTitle" title=$article->getLocalizedTitle()} | ||
{include file="frontend/components/headerHead.tpl"} | ||
<body class="pkp_page_{$requestedPage|escape} pkp_op_{$requestedOp|escape}"> | ||
|
||
{* Header wrapper *} | ||
<header class="header_view"> | ||
|
||
<a href="{url page="article" op="view" path=$article->getBestArticleId()}" class="return"> | ||
<span class="pkp_screen_reader"> | ||
{translate key="article.return"} | ||
</span> | ||
</a> | ||
|
||
<a href="{url page="article" op="view" path=$article->getBestArticleId()}" class="title"> | ||
{$article->getLocalizedTitle()|escape} | ||
</a> | ||
</header> | ||
|
||
<div id="htmlContainer" class="galley_view"> | ||
<iframe id="htmlGalleyFrame" name="htmlFrame" src="{url page="article" op="download" path=$article->getBestArticleId()|to_array:$galley->getBestGalleyId() inline=true}" allowfullscreen webkitallowfullscreen></iframe> | ||
</div> | ||
{call_hook name="Templates::Common::Footer::PageFooter"} | ||
|
||
{* Default style if CSS isn't attached to the HTML Galley *} | ||
{if $boolEmbeddedCss === false} | ||
<script type="text/javascript">{literal} | ||
window.onload = function() { | ||
var iframe = document.getElementById('htmlGalleyFrame'); | ||
var insideFrame = iframe.contentDocument || iframe.contentWindow.document; | ||
var headNode = insideFrame.getElementsByTagName('head')[0]; | ||
// Loading CSS stylesheet | ||
var linkElement = document.createElement('link'); | ||
linkElement.type = 'text/css'; | ||
linkElement.rel = 'stylesheet'; | ||
linkElement.href = "{/literal}{$themePath|escape:"javascript"}{literal}/templates/plugins/generic/htmlArticleGalley/css/default.css"; | ||
headNode.appendChild(linkElement); | ||
// Google Fonts | ||
var linkFont= document.createElement('link'); | ||
linkFont.rel = 'stylesheet'; | ||
linkFont.href = "https://fonts.googleapis.com/css?family=PT+Serif"; | ||
headNode.appendChild(linkFont); | ||
}; | ||
{/literal}</script> | ||
{/if} | ||
</body> | ||
</html> |