Commit 69317436 authored by Yannis Barlas's avatar Yannis Barlas

first version

parents
node_modules/
const express = require('express')
const Vivliostyle = (app) => {
console.log('happening')
app.use('/vivliostyle', express.static(__dirname + '/vivliostyle-viewer'))
}
module.exports = Vivliostyle
module.exports = {
backend: () => app => require('./Vivliostyle')(app)
}
{
"name": "pubsweet-component-vivliostyle-viewer",
"version": "0.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Yannis Barlas",
"license": "MIT",
"dependencies": {
"express": "^4.15.5"
}
}
# License
Vivliostyle Viewer is licensed under [AGPL Version 3](licenses/agpl-3.0.txt).
This package contains following components:
- [Vivliostyle core engine](https://github.com/vivliostyle/vivliostyle.js)
- Licensed under [AGPL Version 3](licenses/agpl-3.0.txt).
- Vivliostyle core engine is implemented based on [Peter Sorotokin's EPUB Adaptive Layout implementation](https://github.com/sorotokin/adaptive-layout), which is licensed under [Apache License, Version 2.0](licenses/Apache.txt).
- [Vivliostyle UI](https://github.com/vivliostyle/vivliostyle-ui)
- Licensed under [AGPL Version 3](licenses/agpl-3.0.txt).
- [Knockout](http://knockoutjs.com/)
- Licensed under [MIT License](licenses/MIT-knockout.txt).
- [Font Awesome](http://fontawesome.io/)
- Only includes font files, which are licensed under [SIL OFL 1.1](http://scripts.sil.org/OFL)
# Vivliostyle Viewer
Vivliostyle Viewerは、HTML(XML)/CSS文書を組版・表示するWebアプリケーションです。
このパッケージは[Vivliostyle core engine](https://github.com/vivliostyle/vivliostyle.js)[Vivliostyle UI](https://github.com/vivliostyle/vivliostyle-ui)およびその他の組版ライブラリーを組み合わせたものです。
- オンラインでサンプルを見る <http://vivliostyle.com/ja/sample/>
- リリース版のダウンロード <http://vivliostyle.github.io/vivliostyle.js/downloads/vivliostyle-js-2017.6.zip>
- 開発最新版のダウンロード <http://vivliostyle.github.io/vivliostyle.js/downloads/vivliostyle-js-latest.zip>
## 使い方
1. ダウンロードしたZIPファイルを展開する
2. ターミナルまたはコマンドプロンプトを開き、1.の展開で作られたフォルダ(`vivliostyle-js-[version]`)に移動する
3. 以下のコマンドを実行する
```
(Mac OS X, Linuxなど、シェルがある環境)
> ./start-webserver
(Windows)
> .\start-webserver
```
Node.js, Ruby, Pythonのいずれかがインストールされている場合、このコマンドでwebサーバーが起動します。
```
Please install Node.js or Python or Ruby and rerun this script, or use your favorite HTTP server.
```
と表示された場合は、これらのいずれかをインストールしてから再実行するか、お好きなwebサーバーを起動してください。
4. ブラウザで<http://localhost:8000>を開く
## 不具合報告・要望
以下にお寄せください。
- GitHub Issues <https://github.com/vivliostyle/vivliostyle.js/issues>
- メーリングリスト <https://groups.google.com/forum/?hl=ja#!forum/vivliostyle-ja>
## ソースコード
- Vivliostyle core engine on GitHub: <https://github.com/vivliostyle/vivliostyle.js>
- Vivliostyle UI on GitHub: <https://github.com/vivliostyle/vivliostyle-ui>
# Vivliostyle Viewer
Vivliostyle Viewer is a web application displaying and typesetting HTML(XML)/CSS documents.
This is a bundled package of [Vivliostyle core engine](https://github.com/vivliostyle/vivliostyle.js), [Vivliostyle UI](https://github.com/vivliostyle/vivliostyle-ui) and other typesetting libraries.
- View samples online: <http://vivliostyle.com/en/sample/>
- Download latest release version: <http://vivliostyle.github.io/vivliostyle.js/downloads/vivliostyle-js-2017.6.zip>
- Download latest development version: <http://vivliostyle.github.io/vivliostyle.js/downloads/vivliostyle-js-latest.zip>
## How to use
1. Unzip the downloaded ZIP file.
2. Open a terminal or a command prompt and navigate to the folder (`vivliostyle-js-[version]`) generated in the step 1.
3. Run the following command:
```
(Shell environment like Mac OS X or Linux)
> ./start-webserver
(Windows)
> .\start-webserver
```
This command starts a web server if either of Node.js, Ruby, Python is installed.
If a message
```
Please install Node.js or Python or Ruby and rerun this script, or use your favorite HTTP server.
```
is shown, install either of them and rerun the command, or start your favorite web server.
4. Open <http://localhost:8000> with a web browser.
## Bug reports & feature requests
Please send them to
- GitHub Issues: <https://github.com/vivliostyle/vivliostyle.js/issues>
- Mailing list: <https://groups.google.com/forum/?hl=ja#!forum/vivliostyle>
## Source code
- Vivliostyle core engine on GitHub: <https://github.com/vivliostyle/vivliostyle.js>
- Vivliostyle UI on GitHub: <https://github.com/vivliostyle/vivliostyle-ui>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
document.addEventListener("DOMContentLoaded", function() {
var href = window.location.href;
if (href.match(/^http/)) {
var root = href.replace(/\/docs\/.*$/, "");
var rootUrls = document.getElementsByClassName("root-url");
for (var i = 0; i < rootUrls.length; i++) {
rootUrls[i].textContent = root;
}
var replaceHrefs = document.getElementsByClassName("replace-href");
for (var i = 0; i < replaceHrefs.length; i++) {
var el = replaceHrefs[i];
el.href = el.href.replace(/^http:\/\/localhost:8000/, root);
}
}
function makeEventListener(input, fragment, link, isEpub) {
return function() {
var filePath = input.value;
if (!filePath.match(/^https?:\/\//)) {
filePath = "../" + filePath.replace(/^\//, "");
}
if (isEpub && filePath.substring(filePath.length-1) !== "/") {
filePath += "/";
}
fragment.textContent = filePath;
var regexp = isEpub ? /#b=.*$/ : /#x=.*$/;
var f = isEpub ? "#b=" : "#x=";
link.href = link.href.replace(regexp, f + filePath);
}
}
var filePathInput = document.getElementById("file-path-input");
var inputFilePathFragment = document.getElementById("input-file-path-fragment");
var inputFilePathLink = document.getElementById("input-file-path-link");
filePathInput.addEventListener("input",
makeEventListener(filePathInput, inputFilePathFragment, inputFilePathLink, false));
var epubPathInput = document.getElementById("epub-path-input");
var inputEpubPathFragment = document.getElementById("input-epub-path-fragment");
var inputEpubPathLink = document.getElementById("input-epub-path-link");
epubPathInput.addEventListener("input",
makeEventListener(epubPathInput, inputEpubPathFragment, inputEpubPathLink, true));
});
code, input[type=text] {
font-family: Consolas, 'Liberation Mono', Menlo, Courier, "游ゴシック", "Yu Gothic", "YuGothic", "ヒラギノ角ゴ ProN W3", "HiraKakuProN-W3", "ヒラギノ角ゴ Pro W3", "HiraKakuPro-W3", "メイリオ", "Meiryo", "MS ゴシック", "MS Gothic", monospace;
}
p {
margin-bottom: 1em;
}
code {
white-space: pre;
}
div.code {
margin: 1em 3em;
}
input[type=text] {
font-size: 110%;
padding: 5px;
}
This diff is collapsed.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, user-scalable=yes" />
<title>Vivliostyle Viewer</title>
<link rel="icon" type="image/x-icon" href="http://vivliostyle.com/images/summary/favicon.ico" />
<link rel="apple-touch-icon-precomposed" href="http://vivliostyle.com/images/summary/touch-icon.png" />
<link href="http://vivliostyle.com/stylesheets/summary/summary.css" rel="stylesheet" type="text/css" />
<script src="http://vivliostyle.com/javascripts/summary/summary.js" type="text/javascript"></script>
</head>
<body class="sample">
<div class="section-content">
<header id="page-header">
<div class="hgroup">
<h1>Vivliostyle <small>CSS Typesetting</small></h1>
</div>
</header>
<div class="section-body" id="page-body">
<section id="testsample">
<div class="section-content">
<h2>Vivliostyle Viewer</h2>
<p><a href="docs/en/">User’s guide (English)</a></p>
<p lang="ja"><a href="docs/ja/">ユーザーガイド(日本語)</a></p>
<p><a href="docs/en/supported-features.html">Features supported by Vivliostyle (English) / Vivliostyleがサポートする機能(英語)</a></p>
</div>
</section>
</div>
<footer id="page-footer">
<div class="pgroup">
<p><a href="http://vivliostyle.com/en/"><span>Vivliostyle Inc.</span></a></p>
</div>
</footer>
</div>
</body>
</html>
This diff is collapsed.
The MIT License (MIT) - http://www.opensource.org/licenses/mit-license.php
Copyright (c) Steven Sanderson, the Knockout.js team, and other contributors
http://knockoutjs.com/
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
This diff is collapsed.
This directory contains Adaptive Layout samples from http://sorotokin.com/adaptive-layout/ .
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
@charset "UTF-8";
// 基本フォントサイズ
$base-font-size: 8.5pt;
// 基本行送り
$base-line-height: 16pt;
// 基本フォントファミリー
$base-font-family: "游明朝", "YuMincho", serif;
// ページのスタイル定義
@import 'base/format';
// タイポグラフィのスタイル定義
@import 'base/typography';
// コンテンツのスタイル定義
@import 'base/contents';
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment