Skip to content

Commit

Permalink
rewritten
Browse files Browse the repository at this point in the history
  • Loading branch information
ralsina committed Sep 14, 2015
1 parent bdac3a2 commit db6b2c5
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions listings/book2.tmpl
Expand Up @@ -6,11 +6,10 @@

<%block name="extra_head">
${parent.extra_head()}

## Get the Gentium Basic font from Google
<link href='https://fonts.googleapis.com/css?family=Gentium+Book+Basic' rel='stylesheet' type='text/css'>
<style>
.smallcaps {
font-variant: small-caps;
}
.chapter {
width: 100%;
padding: 10px;
Expand All @@ -19,6 +18,7 @@
-webkit-column-count: 2;
-webkit-column-rule: 1px solid #ddd;
height: 90vh;
## Use Gentium for the text
font-family: 'Gentium Book Basic', serif;
color: #2d2e2e;
font-weight: 500;
Expand All @@ -33,6 +33,11 @@
padding: 0;
margin: 0;
}
## The document uses a smallcaps role/class. This makes it actual smallcaps.
.smallcaps {
font-variant: small-caps;
}
## Titles in bold, centered, very black Gentium
h1, h2, h3, h4 {
text-align: center;
width: 100%;
Expand All @@ -47,19 +52,29 @@
text-align: center;
width: 100%;
}

## Images in figures are as large as they can be
## respecting aspect ratio
.bookfig {
width: 100%;
height: auto;
max-width: 100%;
max-height: 100%;
}

## Figures are slightly smaller than a page, so they
## will use one fully.
div.figure {
height: 88vh;
margin: 0;
}

## Minor tweak
div.topic {
margin: 0;
}

## Follow paragraph typesetting conventions from the original book.
div.section > p {
text-indent: 1em;
margin-bottom: 0;
Expand All @@ -81,7 +96,9 @@
</article>
</%block>

## The extra_js block goes always at the end, right before closing the <body> tag.
<%block name="extra_js">
## Load FlowType.JS and apply it to the main text.
<script src="//cdnjs.cloudflare.com/ajax/libs/Flowtype.js/1.1.0/flowtype.min.js"></script>
<script>
$('#scrolling-cont').flowtype({
Expand Down

0 comments on commit db6b2c5

Please sign in to comment.