Skip to content

Commit

Permalink
Upgrade all templates with better line-tracking using gadda-gadda alg…
Browse files Browse the repository at this point in the history
…orithm.
  • Loading branch information
marvindanig committed Sep 16, 2019
1 parent 0b39509 commit 810456d
Show file tree
Hide file tree
Showing 10 changed files with 226 additions and 111 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bookiza",
"version": "1.8.15",
"version": "2.8.15",
"description": "The book reification framework for the web",
"logo": {
"file": "./assets/images/bookiza.png"
Expand Down
2 changes: 1 addition & 1 deletion templates/blank/head.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!-- See the HTML structure of a single page on a Superbook at: https://bubblin.io/docs/structure.html -->
<!-- See the HTML structure of a single page on a Superbook at: https://bubblin.io/docs/structure.html -->
2 changes: 1 addition & 1 deletion templates/childrens/head.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<title> Comics | Bubblin Superbooks | Bookiza </title>
<title> Children's book | Bubblin Superbooks | Bookiza </title>
4 changes: 2 additions & 2 deletions templates/novel/head.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<link href='https://fonts.googleapis.com/css?family=EB+Garamond:400,400i|Berkshire+Swash' rel='stylesheet' type='text/css'>
<title> [ Novel ] | Bubblin Superbooks | Bookiza </title>
<link href='https://fonts.googleapis.com/css?family=EB+Garamond:400,400i|Berkshire+Swash&display=swap' rel='stylesheet' type='text/css'>
<title> [ Novel ] | Bubblin Superbooks | Bookiza </title>
106 changes: 72 additions & 34 deletions templates/novel/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,16 @@ body {
h1,
h2,
h3,
h4 {
margin: 2vw 0;
padding: 0;
padding: 0;
color: #444;
h4,
h5 {
width: 100%;
text-align: center;
font-weight: 100;
line-height: 1.25;
line-height: calc(2 * 4vw * 1.50);
}

h5,
h6 {
line-height: calc(1 * 4vw * 1.50);
}

h1,
Expand All @@ -38,11 +39,42 @@ h4,
h5,
h6 {
font-family: 'Berkshire Swash', cursive;
margin: 0 0;
padding: 0;
color: #000;
font-weight: 100;
}

h1 {
font-size: 8vw;
}

h2 {
font-size: 6vw;
}

h3 {
font-size: 5vw;
}

h4 {
font-size: 4vw;
}

h5 {
font-size: 4vw;
}

h6 {
font-size: 4vw;
}

img {
border: 0;
-ms-interpolation-mode: bicubic;
display:block;
margin: calc(1/2 * 4vw * 1.50) auto;

}

a {
Expand All @@ -69,32 +101,33 @@ p {

p.start-chapter {
text-indent: 0;
margin: 0 0 0 0;
margin: calc(5 * 4vw * 1.50 - 2px) auto 0;
}

p.start-chapter:first-letter {
display: inline-block;
margin: 0 1vw 0 0;
float: left;
font-size: calc( 3 * 4vw ); /* three times normal size */
font-size: calc(3 * 4vw); /* three times normal size */
line-height: calc(2 * 4vw * 1.50 * 0.95);
font-family: 'Berkshire Swash', cursive;
/* background: yellow; */ /* Test what looks good on your book */
font-family: 'Berkshire Swash', cursive;
}


blockquote {
text-align: center;
font-size: 90%;
font-style: italic;
position: relative;
quotes: "\201C""\201D""\2018""\2019";
width: 90%;
margin: calc( 4 * (150vh *(1115/1443))/100 * 7/5) auto;
margin: calc( 1/2 * (150vh *(1115/1443))/100 * 7/5) auto;
margin: calc( 1/2 * 4vw * 1.50) 0;
margin: 0 0;
display: inline-block;
width: 100%;
}

blockquote p {
margin: calc( 4 * (150vh *(1115/1443))/100 * 7/5) auto !important;
blockquote p, blockquote em {
margin: 0 auto !important;
}

pre,
Expand All @@ -104,16 +137,19 @@ code {
white-space: -pre-wrap;
white-space: -o-pre-wrap;
word-wrap: break-word;
margin: 0 auto calc( 4 * (150vh *(1115/1443))/100 * 7/5);
font-size: 90%;
margin: 0;
padding: 0;
text-align: center;
}

h3 {
font-family: 'Berkshire Swash', cursive;
line-height: 1.2em;
color: black;
font-size: 200%;
font-family: 'EB Garamond', serif;
font-style: normal;
font-synthesis: none;
font-stretch: ultra-condensed;
font-variant: no-common-ligatures proportional-nums slashed-zero;
font-size: 4vw;
line-height: calc(4vw * 1.50);
font-kerning: normal;
text-rendering: geometricPrecision;
/*background: pink;*/
}

ol {
Expand Down Expand Up @@ -170,7 +206,7 @@ hr.section::after {
}

hr.section::before {
content: "";
content: "";
color: black;
}

Expand All @@ -187,7 +223,7 @@ hr.chapter::after {
}

hr.chapter::before {
content: "";
content: "";
color: black;
}

Expand Down Expand Up @@ -222,9 +258,11 @@ hr::before {
.inner {
margin: calc((100vh - (17 * (4vw * 1.5) + 4vw))/2) auto;
width: 85vw;
height: calc(17 * (4vw * 1.5) + 4vw);
max-height: calc(17 * (4vw * 1.5) + 4vw);
break-after: right;
/*background: aliceblue; */ /* enable to see the maximum staging area */
display:inline-block;
/* background: aliceblue; */ /* enable to see the maximum staging area */
}

.flex {
Expand All @@ -241,22 +279,22 @@ hr::before {

/* Helper classes */

.no-indent {
p.no-indent {
text-indent: 0;
/* Continue line on a new page with break on the previous page. */
}

.stretch-last-line {
p.stretch-last-line {
text-align-last: justify;
/* Not supported on Safari */
}

.squeeze-para {
p.squeeze-para {
letter-spacing: -0.5px;
/* Handle orphans and widows manually */
}

.stretch-para {
p.stretch-para {
letter-spacing: 0.5px;
/* Handle orphans and widows manually */
}
Expand All @@ -271,9 +309,9 @@ hr::before {

.center {
text-align: center;
margin: 0 auto;
margin: inherit auto;
}

.small {
font-size: 80%;
}
}
4 changes: 2 additions & 2 deletions templates/novella/head.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<link href='https://fonts.googleapis.com/css?family=EB+Garamond:400,400i|Berkshire+Swash' rel='stylesheet' type='text/css'>
<title> [Novella] | Bubblin Superbooks | Bookiza </title>
<link href='https://fonts.googleapis.com/css?family=EB+Garamond:400,400i|Berkshire+Swash&display=swap' rel='stylesheet' type='text/css'>
<title> [Novella] | Bubblin Superbooks | Bookiza </title>
Loading

0 comments on commit 810456d

Please sign in to comment.