Skip to content

Commit

Permalink
Merge pull request #2063 from getnikola/dr-nikola-gets-it
Browse files Browse the repository at this point in the history
showoff a little using Dr. Nikola's Vendetta
  • Loading branch information
ralsina committed Sep 15, 2015
2 parents c31add9 + 10a2410 commit 6984ccb
Show file tree
Hide file tree
Showing 5 changed files with 141 additions and 25 deletions.
1 change: 1 addition & 0 deletions CHANGES.txt
Expand Up @@ -4,6 +4,7 @@ New in master
Features
--------

* Better Template / JS / CSS demo in sample site.
* New normalize_html filter
* Support UTF-8 paths and encoded links when the ``USE_SLUGIFY`` option
is disabled. (Issue #2037)
Expand Down
Binary file added nikola/data/samplesite/images/frontispiece.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified nikola/data/samplesite/images/illus_001.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 23 additions & 25 deletions nikola/data/samplesite/stories/dr-nikolas-vendetta.rst
@@ -1,23 +1,18 @@
A BID FOR FORTUNE OR; DR. NIKOLA'S VENDETTA
===========================================

By GUY BOOTHBY

Author of "Dr. Nikola," "The Beautiful White Devil," etc., etc.

PART I
======
.. title: A BID FOR FORTUNE OR; DR. NIKOLA'S VENDETTA
.. template: book.tmpl
.. hyphenate: yes
.. filters: filters.typogrify
.. class:: subtitle

By `GUY BOOTHBY <http://www.gutenberg.org/ebooks/author/3587>`__

PROLOGUE
--------

DR. NIKOLA
~~~~~~~~~~
Author of "Dr. Nikola," "The Beautiful White Devil," etc., etc.

.. figure:: /images/frontispiece.jpg
:class: bookfig

.. sidebar:: The Project Gutenberg EBook of A Bid for Fortune, by Guy Boothby
.. topic:: The Project Gutenberg EBook of A Bid for Fortune, by Guy Boothby

This eBook is for the use of anyone anywhere at no cost and with
almost no restrictions whatsoever. You may copy it, give it away or
Expand All @@ -28,7 +23,7 @@ DR. NIKOLA
Title: A Bid for Fortune
or Dr. Nikola's Vendetta

Author: Guy Boothby
Author: `Guy Boothby <http://www.gutenberg.org/ebooks/author/3587>`__

Release Date: May 29, 2007 [EBook #21640]

Expand All @@ -43,9 +38,19 @@ DR. NIKOLA
LONDON, MELBOURNE AND TORONTO
1918

.. figure:: /images/illus_001.jpg
:class: bookfig

PART I
======

PROLOGUE
--------

.. role:: smallcaps


The manager of the new Imperial Restaurant on the Thames Embankment went
:smallcaps:`The` manager of the new Imperial Restaurant on the Thames Embankment went
into his luxurious private office and shut the door. Having done so, he
first scratched his chin reflectively, and then took a letter from the
drawer in which it had reposed for more than two months and perused it
Expand All @@ -61,13 +66,6 @@ at the dial; the hands stood at half-past seven. He immediately threw
the letter on the table, and as he did so his anxiety found relief in
words.

.. class:: pull-left

.. figure:: /images/illus_001.jpg

"Again she turned her face from me."


"It's really the most extraordinary affair I ever had to do with," he
remarked. "And as I've been in the business just three-and-thirty years
at eleven a.m. next Monday morning, I ought to know something about it.
Expand Down Expand Up @@ -467,4 +465,4 @@ Sailor* public-house, East India Dock Road."

------------------------

You can read the rest of "A Bid For Fortune; Or, Dr. Nikola's Vendetta" at `Project Gutenberg <http://www.gutenberg.org/ebooks/21640>`__
You can read the rest of "A Bid For Fortune; Or, Dr. Nikola's Vendetta" at `Open Library <https://archive.org/stream/bidforfortunenov00bootiala#page/12/mode/2up>`__
117 changes: 117 additions & 0 deletions nikola/data/samplesite/templates/book.tmpl
@@ -0,0 +1,117 @@
## -*- coding: utf-8 -*-
<%namespace name="helper" file="post_helper.tmpl"/>
<%namespace name="pheader" file="post_header.tmpl"/>
<%namespace name="comments" file="comments_helper.tmpl"/>
<%inherit file="post.tmpl"/>

<%block name="extra_head">
${parent.extra_head()}
<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;
-webkit-column-gap: 40px;
-moz-column-gap: 40px;
column-gap: 40px;
-webkit-column-width: 400px;
-moz-column-width: 400px;
column-width: 400px;
-webkit-column-count: 2;
-moz-column-count: 2;
column-count: 2;
-webkit-column-rule: 1px solid #ddd;
-moz-column-rule: 1px solid #ddd;
column-rule: 1px solid #ddd;
height: 90vh;
font-family: 'Gentium Book Basic', serif;
color: #2d2e2e;
font-weight: 500;
}
div.frame {
overflow: hidden;
padding: 0;
margin: 0;
}
div.scrolling-cont {
overflow-x: scroll;
padding: 0;
margin: 0;
}
h1, h2, h3, h4 {
text-align: center;
width: 100%;
font-family: 'Gentium Book Basic', serif;
font-size: 120%;
font-weight: 900;
}
h1 {
font-size: 150%;
}
.subtitle {
text-align: center;
width: 100%;
}
.bookfig {
width: 100%;
height: auto;
max-width: 100%;
max-height: 100%;
}
div.figure {
height: 88vh;
margin: 0;
}
div.topic {
margin: 0;
}
div.section > p {
text-indent: 1em;
margin-bottom: 0;
text-align: justify;
}
</style>
</%block>

<%block name="content">
<article class="storypage" itemscope="itemscope" itemtype="http://schema.org/Article">
<div class="frame">
<div class="scrolling-cont" id="scrolling-cont" name="scrolling-cont">
<div class="e-content entry-content chapter" itemprop="articleBody text">
<h1>${post.title()}</h1>
${post.text()}
</div>
</div>
</div>
</article>
</%block>

<%block name="extra_js">
<script src="//cdnjs.cloudflare.com/ajax/libs/Flowtype.js/1.1.0/flowtype.min.js"></script>
<script>
$('#scrolling-cont').flowtype({
minimum: 500,
maximum: 1200,
minFont: 20,
maxFont: 40,
fontRatio: 50
});
$(document).ready(function() {
var elem = $('#scrolling-cont');
elem.click(function(event) {
var x1 = elem.position().left;
var pw = elem.width() + 20;
var x2 = event.pageX;
if (x2 - x1 < pw / 2) {
pw = -pw;
}
elem.animate({
scrollLeft: '+=' + pw
}, 500)
});
});
</script>
</%block>

0 comments on commit 6984ccb

Please sign in to comment.