Commit 7785261d authored by sarah's avatar sarah

book3epub

parent 34784486
......@@ -3,16 +3,18 @@
function collapseAppendix (node) {
node.classList.add('collapsed');
node.classList.remove('expand');
}
function expandAppendix (node) {
node.classList.remove('collapsed');
node.classList.add('expand');
}
function toggleAppendix (node) {
node.classList.toggle('collapsed');
}
function blessAppendixes () {
var nodes = document.getElementsByTagName('article');
for (var i=0; i < nodes.length; i++) {
......@@ -42,4 +44,4 @@
window.blessAppendixes = blessAppendixes;
window.collapseAllAppendixes = collapseAllAppendixes;
window.expandAllAppendixes = expandAllAppendixes;
})(window, document);
\ No newline at end of file
})(window, document);
......@@ -13,77 +13,82 @@
content: "Knowing the City";
}
.paper:nth-of-type(1) {
> .page {
background-image: url("img/light_7864.svg");
}
}
.paper:nth-of-type(2),
.paper:nth-of-type(3) {
> .page {
background-image: url("img/light_8585.svg");
}
}
.paper:nth-of-type(4),
.paper:nth-of-type(5),
.paper:nth-of-type(6) {
> .page {
background-image: url("img/light_7132.svg");
}
}
.paper:nth-of-type(7),
.paper:nth-of-type(8),
.paper:nth-of-type(9),
.paper:nth-of-type(10),
.paper:nth-of-type(11) {
> .page {
background-image: url("img/light_4322.svg");
}
}
.paper:nth-of-type(12),
.paper:nth-of-type(13),
.paper:nth-of-type(14) {
> .page {
background-image: url("img/light_780.svg");
}
}
.paper:nth-of-type(15),
.paper:nth-of-type(16),
.paper:nth-of-type(17),
.paper:nth-of-type(18),
.paper:nth-of-type(19),
.paper:nth-of-type(20),
.paper:nth-of-type(21),
.paper:nth-of-type(22) {
> .page {
background-image: url("img/light_9074.svg");
}
}
.paper:nth-of-type(23),
.paper:nth-of-type(24),
.paper:nth-of-type(25),
.paper:nth-of-type(26),
.paper:nth-of-type(27) {
> .page {
background-image: url("img/light_9666.svg");
}
}
.paper:nth-of-type(28),
.paper:nth-of-type(29),
.paper:nth-of-type(30),
.paper:nth-of-type(31),
.paper:nth-of-type(32) {
> .page {
background-image: url("img/light_9778.svg");
}
}
// .collapsed h2 {
//
// background-image: url("img/light_7864.svg");
// background-color: red;
// }
// .paper:nth-of-type(1) {
// > .page {
// background-image: url("img/light_7864.svg");
// }
// }
// .paper:nth-of-type(2),
// .paper:nth-of-type(3) {
// > .page {
// background-image: url("img/light_8585.svg");
// }
// }
// .paper:nth-of-type(4),
// .paper:nth-of-type(5),
// .paper:nth-of-type(6) {
// > .page {
// background-image: url("img/light_7132.svg");
// }
// }
// .paper:nth-of-type(7),
// .paper:nth-of-type(8),
// .paper:nth-of-type(9),
// .paper:nth-of-type(10),
// .paper:nth-of-type(11) {
// > .page {
// background-image: url("img/light_4322.svg");
// }
// }
//
// .paper:nth-of-type(12),
// .paper:nth-of-type(13),
// .paper:nth-of-type(14) {
// > .page {
// background-image: url("img/light_780.svg");
// }
// }
//
// .paper:nth-of-type(15),
// .paper:nth-of-type(16),
// .paper:nth-of-type(17),
// .paper:nth-of-type(18),
// .paper:nth-of-type(19),
// .paper:nth-of-type(20),
// .paper:nth-of-type(21),
// .paper:nth-of-type(22) {
// > .page {
// background-image: url("img/light_9074.svg");
//
// }
// }
//
// .paper:nth-of-type(23),
// .paper:nth-of-type(24),
// .paper:nth-of-type(25),
// .paper:nth-of-type(26),
// .paper:nth-of-type(27) {
// > .page {
// background-image: url("img/light_9666.svg");
//
// }
// }
// .paper:nth-of-type(28),
// .paper:nth-of-type(29),
// .paper:nth-of-type(30),
// .paper:nth-of-type(31),
// .paper:nth-of-type(32) {
// > .page {
// background-image: url("img/light_9778.svg");
//
// }
//
// }
.page {
// background-image: url("img/bay-test.png");
......@@ -222,23 +227,36 @@ article + article {
-webkit-region-break-before:always;
padding-top: 0.5 * (@page-height - (@page-margin-top + @page-margin-bottom + @header-height + @footer-height));
}
article.expand {
div:first-of-type {
display: none;
}
}
article.collapsed {
-webkit-region-break-before:avoid;
padding-top: 0px;
* {
display: none;
}
h1, h2 {
h1, h2, div:first-of-type, div:first-of-type img {
display: block;
}
h1{
font-size: 10pt !important;
padding: 1px 6px 0px 5pt !important;
}
h2 {
font-size: 18pt !important;
line-height: 19pt;
}
}
article h2.collapsed {
border-bottom : none !important;
}
.body,
......@@ -246,7 +264,9 @@ article h2.collapsed {
.paper:nth-child(even) .page .body {
padding: 6px 0px;
}
article.epub {
padding-bottom: 0pt !important;
}
article {
// outline: 3px solid @color-canal;
// outline-color: @color-canal;
......
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