Commit 90e3d409 authored by julientaq's avatar julientaq
Browse files

vivliostyle export works, lumino styles to update for booksprints

parent 4b20a9f0
# bookstyler
- css variables are translated into real css using postCSS.
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -8647,9 +8647,9 @@ module.exports = {
/***/ }),
/***/ "./node_modules/webpack-dev-server/client/index.js?http://localhost:8080":
/***/ "./node_modules/webpack-dev-server/client/index.js?http://localhost:9012":
/*!*********************************************************!*\
!*** (webpack)-dev-server/client?http://localhost:8080 ***!
!*** (webpack)-dev-server/client?http://localhost:9012 ***!
\*********************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
......@@ -8902,7 +8902,7 @@ function reloadApp() {
rootWindow.location.reload();
}
}
/* WEBPACK VAR INJECTION */}.call(this, "?http://localhost:8080"))
/* WEBPACK VAR INJECTION */}.call(this, "?http://localhost:9012"))
/***/ }),
......@@ -9301,10 +9301,10 @@ module.exports.setLogLevel = function(level) {
/***/ }),
/***/ "./src/assets/bookScss/book.scss":
/*!***************************************!*\
!*** ./src/assets/bookScss/book.scss ***!
\***************************************/
/***/ "./src/assets/bookScss/book.css":
/*!**************************************!*\
!*** ./src/assets/bookScss/book.css ***!
\**************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
......@@ -9312,10 +9312,10 @@ module.exports.setLogLevel = function(level) {
/***/ }),
/***/ "./src/assets/minion.scss":
/*!********************************!*\
!*** ./src/assets/minion.scss ***!
\********************************/
/***/ "./src/assets/minion.css":
/*!*******************************!*\
!*** ./src/assets/minion.css ***!
\*******************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
......@@ -9345,44 +9345,64 @@ module.exports = __webpack_require__.p + "book.html";
/***/ }),
/***/ "./src/index.js":
/*!**********************!*\
!*** ./src/index.js ***!
\**********************/
/***/ "./src/bookStyle.js":
/*!**************************!*\
!*** ./src/bookStyle.js ***!
\**************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var _book = __webpack_require__(/*! ./assets/bookScss/book.scss */ "./src/assets/bookScss/book.scss");
var _book = __webpack_require__(/*! ./assets/bookScss/book.css */ "./src/assets/bookScss/book.css");
var _book2 = _interopRequireDefault(_book);
__webpack_require__(/*! ./assets/minion.css */ "./src/assets/minion.css");
__webpack_require__(/*! ./book.pug */ "./src/book.pug");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/***/ }),
/***/ "./src/vivliostyle.js":
/*!****************************!*\
!*** ./src/vivliostyle.js ***!
\****************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
__webpack_require__(/*! ./bookStyle */ "./src/bookStyle.js");
var _layout = __webpack_require__(/*! ./assets/vivliostyle/layout.css */ "./src/assets/vivliostyle/layout.css");
var _layout2 = _interopRequireDefault(_layout);
__webpack_require__(/*! ./assets/minion.scss */ "./src/assets/minion.scss");
var _minion = __webpack_require__(/*! ./assets/minion.css */ "./src/assets/minion.css");
__webpack_require__(/*! ./book.pug */ "./src/book.pug");
var _minion2 = _interopRequireDefault(_minion);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/***/ }),
/***/ 0:
/*!******************************************************************************!*\
!*** multi (webpack)-dev-server/client?http://localhost:8080 ./src/index.js ***!
\******************************************************************************/
/*!************************************************************************************!*\
!*** multi (webpack)-dev-server/client?http://localhost:9012 ./src/vivliostyle.js ***!
\************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__(/*! /home/julientaq/projects/coko/05.UCP-stylesheets/bookStyler/node_modules/webpack-dev-server/client/index.js?http://localhost:8080 */"./node_modules/webpack-dev-server/client/index.js?http://localhost:8080");
module.exports = __webpack_require__(/*! ./src/index.js */"./src/index.js");
__webpack_require__(/*! /home/julientaq/projects/coko/05.UCP-stylesheets/bookStyler/node_modules/webpack-dev-server/client/index.js?http://localhost:9012 */"./node_modules/webpack-dev-server/client/index.js?http://localhost:9012");
module.exports = __webpack_require__(/*! ./src/vivliostyle.js */"./src/vivliostyle.js");
/***/ })
/******/ });
//# sourceMappingURL=main.js.map
\ No newline at end of file
//# sourceMappingURL=vivliostyle.js.map
\ No newline at end of file
This diff is collapsed.
{
"main.css": "./assets/style.css",
"main.js": "js/main.js",
"main.js.map": "js/main.js.map",
"assets/fonts/MinionPro-Bold.otf": "assets/fonts/MinionPro-Bold.otf",
"assets/fonts/MinionPro-BoldIt.otf": "assets/fonts/MinionPro-BoldIt.otf",
"assets/fonts/MinionPro-It.otf": "assets/fonts/MinionPro-It.otf",
"assets/fonts/MinionPro-Regular.otf": "assets/fonts/MinionPro-Regular.otf",
"vivliostyle.css": "./assets/vivliostyle.css",
"vivliostyle.js": "js/vivliostyle.js",
"vivliostyle.js.map": "js/vivliostyle.js.map",
"book.pug": "book.html"
}
\ No newline at end of file
@import "./parts/vars.css";
@import "./parts/body.css";
@import "./parts/header.css";
@import "./parts/chains.css";
/* specific headers for title pages */
@import "parts/display.css";
/* @import "parts/startChapter.css"; */
@import "parts/endnotes.css";
/* specific for differnet page models */
@import "parts/page/page-subvention.css";
@import "parts/page/page-half-title.css";
@import "parts/page/page-series.css";
@import "parts/page/page-title.css";
@import "parts/page/page-dedication.css";
@import "parts/page/page-epigraph.css";
@import "parts/page/page-copyright.css";
@import "parts/page/page-frontMatter.css";
@import "parts/page/page-toc.css";
......@@ -20,7 +20,7 @@
// based on UCP styles
@import "parts/display";
// start chapter
@import "parts/startChapter";
// @import "parts/startChapter";
// numbering everything that would be to be numbered in this file.
@import "parts/numbering";
// endnotes
......
// this helpers show the number of lines
.numbering p {
font-size: $fontSize;
line-height: $lineHeight;
box-sizing: content-box;
padding: 0;
margin: 0;
text-indent: 0;
text-align: right;
background: grey;
display: block;
height:17px;
overflow: hidden;
}
.numbering p:nth-of-type(2n) {
background: lightgrey;
}
/* this helpers show the number of lines for your book. */
.numbering p {
font-size: var(--fontSize);
line-height: var(--lineHeight);
box-sizing: content-box;
padding: 0;
margin: 0;
text-indent: 0;
text-align: right;
background: grey;
display: block;
height:17px;
overflow: hidden;
}
.numbering p:nth-of-type(2n) {
background: lightgrey;
}
......@@ -6,14 +6,11 @@ Define flow with specific updated layout on different pages
@page {
size: 6in 9in;
background: red;
/* size: 576px 864px*/
}
/* Also an issue for printing—Chrome 52 ignores the (probably unknowable for it) printer pixels and uses 1px = 1/72in as the thinnest possible line. Tried fractional pixels, inches, ems—none would create a line thinner than 1/72in. Even in a print media query. Tempted to see if using an image works, but I suspect I'll just make my peace with the chubby rules – Roger Krueger Aug 30 '16 at 3:03 */
/* @import 'add-to-style.css'; */
.numbering {
......@@ -175,6 +172,7 @@ Define flow with specific updated layout on different pages
-epubx-required: true;
}
@-epubx-partition publisher {
-epubx-enabled: false;
/* partition just for title page */
-epubx-flow-from: publisher;
bottom: 85px;
......
/* General CSS for contents */
html {
font-family: $bodyFont;
font-weight: normal;
font-size: $fontSize;
color: $bodyColor;
font-kerning: normal;
}
p {
font-size: $fontSize;
line-height: $lineHeight;
text-align: $textAlign;
text-indent: 1pc;
margin: 0;
padding: 0;
-webkit-hyphens: auto;
-ms-hyphens: auto;
hyphens: auto;
-moz-hyphens: auto;
&:first-of-type {text-indent: 0; }
}
p, li {
strong, .bold, .Bold {
// font-family: $bodyFontBold;
// font-weight: bold;
}
}
em, .italic {
font-family: inherit;
font-style: $bodyFontItalicStyle;
font-weight: 400;
}
pre {
max-width: $pageWidth - ($marginIn + $marginOut);
}
a {
color: $colorHead;
// border-bottom: 1px solid $colorHead;
font-family: $bodyFontLink;
font-weight: 400;
// font-size: $fontSize + 1.5;
text-decoration: none;
font-style: inherit;
&:hover {
color: $colorSub;
border-bottom: 2px solid $colorSub;
// font-weight: bolder;
}
&:before {
// @extend .fa;
// content: "\f08e";
// font-size: $fontSize;
// margin-right: 2mm;
// margin-left: 1mm;
}
}
strong em {
font-weight: bold;
font-style: italic;
}
var {
font-family: $headFont;
font-weight: normal;
em, .Italic {
font-weight: normal;
font-style: normal;
}
}
// normal blockquote of the book
blockquote {
display: block;
margin-top: 13pt;
margin-bottom: 12.8pt;
margin-left: 1pc;
p {
font-style: normal;
font-size: 12px;
line-height: 12.80pt;
text-indent: 0;
text-align: justify;
margin-top: 0;
}
p + p {
margin-top: 0
}
p:last-of-type {
// margin-bottom: 13pt;
}
}
sup {
font-size: $fontSize * 0.5;
font-weight: inherit;
position: relative;
top: -3px;
vertical-align: baseline;
}
.references p {
line-height: 16px;
font-size: 13px;
}
hr {
&:after {
content: "• • •";
height: 17px;
display: block;
text-align: center;
font-size: 9px;
letter-spacing: 1em;
}
break-before: avoid;
margin-top: 5px;
margin-bottom: 29px;
border: none;
&.ls {
height: 0px;
&:after {
content: "\2002";
}
}
}
.small-caps {
font-variant-caps: all-small-caps;
// old syntax
font-feature-settings: "smcp", "c2sc";
}
.old-style-figures {
font-variant-numeric: oldstyle-nums;
font-feature-settings: "onum";
}
\ No newline at end of file
html {
counter-reset: chapter;
}
/* half title*/
.ht {
margin-top: 8px;
margin-bottom: 0;
font-weight: 400;
line-height: 36px;
font-size: 24px;
}
/* Parts */
.pt {
break-before: page;
font-size: 16px;
line-height: 1;
margin: 0;
font-variant: all-small-caps;
font-feature-settings: "smcp", "c2sc";
letter-spacing: 1px;
text-align: center;
font-weight: 400;
}
.notes {
ol {
margin-top: 0;
margin-bottom: 0;
margin-left: 8px;
li {
margin-top: 0;
margin-bottom: 0;
font-size: 11px;
line-height: 15px;
&:first-of-type {
margin-top: 0;
margin-bottom: 0;
}
&:last-of-type {
margin-top: 0;
margin-bottom: 0;
}
&:first-child {
margin-top: 0px;
}
&:first-child {
margin-top: 0px;
}
p {
font-size: 10px;
line-height: 13px;
}
}
}
}
.footnoteRef {
font-style: normal !important;
}
.fm-body , .notes {
hgroup {
margin: 0;
h1.fmh {
font-size: 16px;
line-height: 1;
font-variant: all-small-caps;
font-feature-settings: "smcp", "c2sc";
letter-spacing: 0.5pt;
margin-bottom: 0;
text-align: center;
font-weight: 400;
&:after {
// @include ruler(24pt, -3.5pt);
}
}
.fmau {
// font-si ze: 13px;
margin-top: 17px;
text-align: center;
text-indent: 0;
margin-bottom: 0;
}
}
.fm1 {
// margin-top: 31.5pt;
// margin-bottom: 0;
// font-size: 13px;
// line-height: 17px;
font-feature-settings: "lnum";
font-variant-numeric: lining-nums;
letter-spacing: 0.5pt;
&:before {
// @include ruler(31.5pt, -23pt);
}
// &:after {
// @include ruler(18.5pt, -4pt);
// }
}
.fmhn {
font-style: italic;
// margin-bottom: 12px;
// line-height: 17px;
& + .fmtxt {
margin-top: 17px;
}
}
.fmtxt {
// font-size: 13px;
// line-height: 12.6pt;
&:after {
// @include ruler(17px, 0);
}
}
.fmsig p {
font-style: italic;
text-align: right;
text-indent: 0;
}
}
// specific crossReferences for the front matter
.fm-body {
.crossRef {
li {
p:after {
content: "123";
font-style: italic;
// font-family: $bodyFont;
font-weight: 300;
// content: " / " target-counter(attr(href, url), page);
display: inline-block;
margin-left: 1em;
// background: white;
}
}
}
}
// for undecorated list of abbreviations
.list-abbreviations .undecorated {
li {
padding-left: 75px;
text-indent: -75px;
padding-right: 75px;
line-height: 17px;
list-style-type: none;
&:before {
content: ' ';
}
p {
abbr {
margin-left: -75px;
float: left;
display: inline-block;
}
}
}
}
// TOC design
.toc {
ul {
font-size: 13px;
line-height: 17px;
list-style-type: none;
text-indent: 0;
li {
margin-bottom: 0;
margin-left: 0;
padding-top: 0;
line-height: $lineHeight;