Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/epistemehealth/health-science-journal.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEpisteme Health Inc <ehi-git@epistemehealth.com>2020-12-30 02:17:33 +0300
committerEpisteme Health Inc <ehi-git@epistemehealth.com>2020-12-30 02:17:33 +0300
commited02e6d0fe60ef17bd297210ab3ff031ff0f887d (patch)
tree8a99fc69d71ce838785487685b6204e77b5294b0
parent18fe5b979179de61209509e69ab02e3507018b96 (diff)
Implement HTML galleys
Implement HTML galley viewing iframe
-rw-r--r--exampleSite/config.toml7
-rw-r--r--exampleSite/content/article/1/1.md2
-rw-r--r--exampleSite/content/article/1/assets/guide.html21
-rw-r--r--exampleSite/netlify.toml4
-rw-r--r--layouts/_default/single.galleyhtml.html0
-rw-r--r--layouts/article/single.galleyhtml.html24
-rw-r--r--layouts/partials/article-main.html2
-rw-r--r--static/css/html-galley-fonts.css36
-rw-r--r--static/css/html-galley.css29
-rw-r--r--static/fonts/PT Free Font License_eng_1.2.txt44
-rw-r--r--static/fonts/PTSerif-cyrillic-ext.woff2bin0 -> 30768 bytes
-rw-r--r--static/fonts/PTSerif-cyrillic.woff2bin0 -> 21936 bytes
-rw-r--r--static/fonts/PTSerif-latin-ext.woff2bin0 -> 21172 bytes
-rw-r--r--static/fonts/PTSerif-latin.woff2bin0 -> 32960 bytes
14 files changed, 164 insertions, 5 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index c815fb5..64dc2a4 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -120,6 +120,11 @@ theme = "health-science-journal"
isPlainText = true
mediaType = "text/html"
path = ""
+ [outputFormats.galleyHTML]
+ baseName = "view-html"
+ isPlainText = true
+ mediaType = "text/html"
+ path = ""
[outputFormats.customlens]
baseName = "js/customlens"
isPlainText = true
@@ -158,7 +163,7 @@ theme = "health-science-journal"
[outputs]
home = ["HTML", "customlens", "localfonts", "lensfonts"]
- page = ["html", "galleyPDF", "galleyXML", "exportris", "exportenw", "exportbib", "exportcsljson" ]
+ page = ["html", "galleyPDF", "galleyXML", "galleyHTML", "exportris", "exportenw", "exportbib", "exportcsljson" ]
[taxonomies]
keyword = "keywords" \ No newline at end of file
diff --git a/exampleSite/content/article/1/1.md b/exampleSite/content/article/1/1.md
index 7308e44..d1d8f3c 100644
--- a/exampleSite/content/article/1/1.md
+++ b/exampleSite/content/article/1/1.md
@@ -32,7 +32,7 @@ PDF = "../assets/guide.pdf"
PDFcanonical = ""
XML = "../assets/guide.xml"
XMLcanonical = ""
-HTML = ""
+HTML = "../assets/guide.html"
HTMLcanonical = ""
EPUB = ""
EPUBcanonical = ""
diff --git a/exampleSite/content/article/1/assets/guide.html b/exampleSite/content/article/1/assets/guide.html
new file mode 100644
index 0000000..b1bf936
--- /dev/null
+++ b/exampleSite/content/article/1/assets/guide.html
@@ -0,0 +1,21 @@
+<!doctype html>
+<html>
+<head>
+<link rel="stylesheet" href="/css/html-galley-fonts.css" type="text/css">
+<link rel="stylesheet" href="/css/html-galley.css" type="text/css">
+<title>Guide to using the Health Sciences Journal Theme</title>
+</head>
+<h1>Guide to using the Health Sciences Journal Theme</h1>
+<p>by Author One</p>
+<h2>Abstract</h2>
+ <p>The Health Sciences Journal Theme is intended to replicate the front end of Open Journal Systems and display content for readers. Journal information pages are contained in the <italic>about</italic> and <italic>contact</italic> directories.The <italic>current</italic> directory will build a contents page for the journal's current issue, which can be set in config.toml. Journal issues should be in separate directories within <italic>article</italic>. For each article, create a .md file for the article containing the metadata for the article and links to the relevant galley files. JATS XML files will be rendered using a modified version of eLife Lens Viewer.</p>
+<h2>Introduction</h2>
+<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris. Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna. Donec vehicula augue eu neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Mauris ut leo. Cras viverra metus rhoncus sem. Nulla et lectus vestibulum urna fringilla ultrices. Phasellus eu tellus sit amet tortor gravida placerat. Integer sapien est, iaculis in, pretium quis, viverra ac, nunc. Praesent eget sem vel leo ultrices bibendum. Aenean faucibus. Morbi dolor nulla, malesuada eu, pulvinar at, mollis ac, nulla. Curabitur auctor semper nulla. Donec varius orci eget risus. Duis nibh mi, congue eu, accumsan eleifend, sagittis quis, diam. Duis eget orci sit amet orci dignissim rutrum.</p>
+<p>Nam dui ligula, fringilla a, euismod sodales, sollicitudin vel, wisi. Morbi auctor lorem non justo. Nam lacus libero, pretium at, lobortis vitae, ultricies et, tellus. Donec aliquet, tortor sed accumsan bibendum, erat ligula aliquet magna, vitae ornare odio metus a mi. Morbi ac orci et nisl hendrerit mollis. Suspendisse ut massa. Cras nec ante. Pellentesque a nulla. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aliquam tincidunt urna. Nulla ullamcorper vestibulum turpis. Pellentesque cursus luctus mauris.</p>
+<p>Nulla malesuada porttitor diam. Donec felis erat, congue non, volutpat at, tincidunt tristique, libero. Vivamus viverra fermentum felis. Donec nonummy pellentesque ante. Phasellus adipiscing semper elit. Proin fermentum massa ac quam. Sed diam turpis, molestie vitae, placerat a, molestie nec, leo. Maecenas lacinia. Nam ipsum ligula, eleifend at, accumsan nec, suscipit a, ipsum. Morbi blandit ligula feugiat magna. Nunc eleifend consequat lorem. Sed lacinia nulla vitae enim. Pellentesque tincidunt purus vel magna. Integer non enim. Praesent euismod nunc eu purus. Donec bibendum quam in tellus. Nullam cursus pulvinar lectus. Donec et mi. Nam vulputate metus eu enim. Vestibulum pellentesque felis eu massa.</p>
+<p>Quisque ullamcorper placerat ipsum. Cras nibh. Morbi vel justo vitae lacus tincidunt ultrices. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. In hac habitasse platea dictumst. Integer tempus convallis augue. Etiam facilisis. Nunc elementum fermentum wisi. Aenean placerat. Ut imperdiet, enim sed gravida sollicitudin, felis odio placerat quam, ac pulvinar elit purus eget enim. Nunc vitae tortor. Proin tempus nibh sit amet nisl. Vivamus quis tortor vitae risus porta vehicula.</p>
+<p>Fusce mauris. Vestibulum luctus nibh at lectus. Sed bibendum, nulla a faucibus semper, leo velit ultricies tellus, ac venenatis arcu wisi vel nisl. Vestibulum diam. Aliquam pellentesque, augue quis sagittis posuere, turpis lacus congue quam, in hendrerit risus eros eget felis. Maecenas eget erat in sapien mattis porttitor. Vestibulum porttitor. Nulla facilisi. Sed a turpis eu lacus commodo facilisis. Morbi fringilla, wisi in dignissim interdum, justo lectus sagittis dui, et vehicula libero dui cursus dui. Mauris tempor ligula sed lacus. Duis cursus enim ut augue. Cras ac magna. Cras nulla. Nulla egestas. Curabitur a leo. Quisque egestas wisi eget nunc. Nam feugiat lacus vel est. Curabitur consectetuer.</p>
+<h2>Acknowledgements</h2>
+ <p>The authors acknowledge the ack tag.</p>
+</body>
+</html> \ No newline at end of file
diff --git a/exampleSite/netlify.toml b/exampleSite/netlify.toml
index e6e0848..cb9e9a2 100644
--- a/exampleSite/netlify.toml
+++ b/exampleSite/netlify.toml
@@ -1,7 +1,7 @@
[build]
publish = "exampleSite/public"
- command = "hugo --gc --minify --source exampleSite --themesDir ../.. --theme repo --baseURL https://health-sci-j-demo.netlify.app"
+ command = "hugo --gc --source exampleSite --themesDir ../.. --theme repo --baseURL https://health-sci-j-demo.netlify.app"
[context.production.environment]
-HUGO_VERSION = "0.74.2"
+HUGO_VERSION = "0.79.1"
HUGO_ENV = "production" \ No newline at end of file
diff --git a/layouts/_default/single.galleyhtml.html b/layouts/_default/single.galleyhtml.html
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/layouts/_default/single.galleyhtml.html
diff --git a/layouts/article/single.galleyhtml.html b/layouts/article/single.galleyhtml.html
new file mode 100644
index 0000000..b5c0d6c
--- /dev/null
+++ b/layouts/article/single.galleyhtml.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html>
+<html lang="{{ if $.Params.language }}{{ slicestr $.Params.language 0 2 }}{{ else }}{{ $.Site.Language }}{{ end }}">
+<head>
+{{ partial "favicon.html" . }}
+{{ partial "relcanonical.html" . }}
+{{ partial "head.html" . }}
+{{ partial "head_custom.html" . }}
+{{ partial "social-meta.html" . }}
+{{ partial "stylesheets.html" . }}
+</head>
+<body class="pkp_page_article pkp_op_view">
+<header class="header_view">
+<a href="{{ .Permalink }}" class="return">
+
+<span class="pkp_screen_reader">
+Return to Article Details
+</span></a>
+<a href ="{{ .Permalink }}" class="title">{{ .Title }}</a>
+</header>
+<div id="htmlContainer" class="galley_view" style="overflow:visible;-webkit-overflow-scrolling:touch">
+ <iframe id="htmlGalleyFrame" name="htmlFrame" src="{{ .Permalink }}{{ .Page.Params.HTML }}" allowfullscreen webkitallowfullscreen></iframe>
+</div>
+</body>
+</html> \ No newline at end of file
diff --git a/layouts/partials/article-main.html b/layouts/partials/article-main.html
index 3399e0f..b952af4 100644
--- a/layouts/partials/article-main.html
+++ b/layouts/partials/article-main.html
@@ -55,7 +55,7 @@ Keywords
PDF
</a></div>{{ end }}
{{ if .Params.HTML }}<div class="article-details-galley"><a class="btn btn-primary" href="{{ .Page.Permalink }}view-html.html">
-HTML.
+HTML
</a></div>{{ end }}
{{ if .Params.XML }}<div class="article-details-galley"><a class="btn btn-primary" href="{{ .Page.Permalink }}view-lens.html">
XML
diff --git a/static/css/html-galley-fonts.css b/static/css/html-galley-fonts.css
new file mode 100644
index 0000000..a560ecd
--- /dev/null
+++ b/static/css/html-galley-fonts.css
@@ -0,0 +1,36 @@
+/* cyrillic-ext */
+@font-face {
+ font-family: 'PT Serif';
+ font-style: normal;
+ font-weight: 400;
+ font-display: swap;
+ src: url(/fonts/PTSerif-cyrillic-ext.woff2) format('woff2');
+ unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
+}
+/* cyrillic */
+@font-face {
+ font-family: 'PT Serif';
+ font-style: normal;
+ font-weight: 400;
+ font-display: swap;
+ src: url(/fonts/PTSerif-cyrillic.woff2) format('woff2');
+ unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
+}
+/* latin-ext */
+@font-face {
+ font-family: 'PT Serif';
+ font-style: normal;
+ font-weight: 400;
+ font-display: swap;
+ src: url(/fonts/PTSerif-latin-ext.woff2) format('woff2');
+ unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
+}
+/* latin */
+@font-face {
+ font-family: 'PT Serif';
+ font-style: normal;
+ font-weight: 400;
+ font-display: swap;
+ src: url(/fonts/PTSerif-latin.woff2) format('woff2');
+ unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
+} \ No newline at end of file
diff --git a/static/css/html-galley.css b/static/css/html-galley.css
new file mode 100644
index 0000000..90aa956
--- /dev/null
+++ b/static/css/html-galley.css
@@ -0,0 +1,29 @@
+p, h1, h2, h3, h4, h5, h6 {
+ font-family: 'PT Serif', serif;
+ line-height: 1.6;
+}
+
+p {
+ font-size: 18px;
+}
+
+@media (min-width: 992px) {
+ body {
+ max-width: 768px;
+ margin: auto;
+ }
+}
+
+@media (min-width: 768px) and (max-width: 991px) {
+ body {
+ max-width: 600px;
+ margin: auto;
+ }
+}
+
+@media (max-width: 767px) {
+ body {
+ padding-left: 5px;
+ padding-right: 5px;
+ }
+} \ No newline at end of file
diff --git a/static/fonts/PT Free Font License_eng_1.2.txt b/static/fonts/PT Free Font License_eng_1.2.txt
new file mode 100644
index 0000000..c66bf5b
--- /dev/null
+++ b/static/fonts/PT Free Font License_eng_1.2.txt
@@ -0,0 +1,44 @@
+Copyright (c) 2009, ParaType Ltd. All Rights Reserved.
+
+LICENSING AGREEMENT
+for the fonts with Original Name: PT Sans, PT Serif
+Version 1.2 - December 23, 2010
+
+GRANT OF LICENSE
+ParaType Ltd grants you the right to use, copy, modify the fonts and distribute
+modified and unmodified copies of the fonts by any means, including placing
+on Web servers for free downloading, embedding in documents and Web pages,
+bundling with commercial and non commercial products, if it does not conflict
+with the conditions listed below:
+
+- You may bundle the font with commercial software, but you may not sell the
+fonts by themselves. They are free.
+
+- You may distribute the fonts in modified or unmodified version only together
+with this Licensing Agreement and with above copyright notice. You have no
+right to modify the text of Licensing Agreement. It can be placed in a separate
+text file or inserted into the font file, but it must be easily viewed by users.
+
+- You may not distribute modified version of the font under the Original name
+or à combination of Original name with any other words without explicit written
+permission from ParaType.
+
+TERMINATION & TERRITORY
+This license has no limits on time and territory, but it becomes null and void
+if any of the above conditions are not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
+ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
+WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK,
+OR OTHER RIGHT. IN NO EVENT SHALL PARATYPE BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL,
+INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT
+OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER
+DEALINGS IN THE FONT SOFTWARE.
+
+ParaType Ltd
+http://www.paratype.ru
+
diff --git a/static/fonts/PTSerif-cyrillic-ext.woff2 b/static/fonts/PTSerif-cyrillic-ext.woff2
new file mode 100644
index 0000000..bcdbc50
--- /dev/null
+++ b/static/fonts/PTSerif-cyrillic-ext.woff2
Binary files differ
diff --git a/static/fonts/PTSerif-cyrillic.woff2 b/static/fonts/PTSerif-cyrillic.woff2
new file mode 100644
index 0000000..df01d14
--- /dev/null
+++ b/static/fonts/PTSerif-cyrillic.woff2
Binary files differ
diff --git a/static/fonts/PTSerif-latin-ext.woff2 b/static/fonts/PTSerif-latin-ext.woff2
new file mode 100644
index 0000000..fb9b3d6
--- /dev/null
+++ b/static/fonts/PTSerif-latin-ext.woff2
Binary files differ
diff --git a/static/fonts/PTSerif-latin.woff2 b/static/fonts/PTSerif-latin.woff2
new file mode 100644
index 0000000..6e04521
--- /dev/null
+++ b/static/fonts/PTSerif-latin.woff2
Binary files differ