forked from cutting-room-floor/tutorial-sherlock
-
Notifications
You must be signed in to change notification settings - Fork 0
/
step1-story.html
158 lines (147 loc) · 6.38 KB
/
step1-story.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
<!DOCTYPE html>
<html>
<head>
<meta charset='UTF-8'/>
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<script src='underscore-min.js'></script>
<style>
body {
margin:0px;
padding:0px;
font:normal 15px/20px Arial,sans-serif;
background:#fff;
}
article {
width:33.3333%;
min-width:320px;
position:relative;
padding-top:40px;
padding-bottom:33.3333%;
}
section {
padding:40px;
margin-left:40px;
position:relative;
transition:background 500ms, color 500ms;
-moz-transition:background 500ms, color 500ms;
-webkit-transition:background 500ms, color 500ms;
}
section,
section a {
color:#888;
color:rgba(128,128,128,0);
text-decoration:none;
text-shadow:rgba(64,64,64,1) 0px 0px 4px;
}
section.active {
background:#222;
color:#eee;
}
section.active a { color:#eee; }
section.active small { color:#aaa; }
h1 { font-size:2em; line-height:1em; }
h2 { font-size:1.3333em; }
h1,h2 { margin:0px 0px 10px; }
p { margin:0px; }
.scroll {
position:absolute;
right:0px; bottom:0px;
font-size:10px;
text-transform:uppercase;
padding:5px 10px;
}
.colophon {
display:block;
margin-top:10px;
}
.cover:before {
content:'';
display:block;
width:120px; height:120px;
margin:0px auto 20px;
}
.cover.active:before { background:url(sprite.png) 0px -120px no-repeat; }
</style>
</head>
<body>
<article>
<section class='cover active'>
<h1>The Adventure of the Bruce-Partington Plans</h1>
<p>by Sir Arthur Conan Doyle</p>
<small class='scroll'>Scroll ▼</small>
</section>
<section>
<h2>221b Baker St.</h2>
<p>November 1895. London is shrouded in fog and Sherlock Holmes and Watson pass time restlessly awaiting a new case. "The London criminal is certainly a dull fellow," Sherlock bemoans. "There have been numerous petty thefts," Watson offers in response. Just then a telegram arrives from Sherlock's brother Mycroft with a mysterious case.</p>
</section>
<section>
<h2>Aldgate Station</h2>
<p>Arthur Cadogan West was found dead, head crushed in on train tracks at Aldgate Station at 6AM Tuesday morning. West worked at Woolwich Arsenal on the Bruce-Partington submarine, a secret military project. Plans for the submarine had been stolen and seven of the ten missing papers were found in West's possession. Mycroft implores Sherlock to take the case and recover the three missing papers.</p>
</section>
<section>
<h2>London Bridge</h2>
<p>Holmes and Watson's investigations take them across London. Sherlock deduces that West was murdered elsewhere, then moved to Aldgate Station to create the illusion that he was crushed on the tracks by a train. On their way to Woolwich Sherlock dispatches a telegram to Mycroft at London Bridge: "Send list of all foreign spies known to be in England, with full address."</p>
</section>
<section>
<h2>Woolwich Arsenal</h2>
<p>While investigating at Woolwich Arsenal Sherlock learns that West did not have the three keys—door, office, and safe—necessary to steal the papers. The train station clerk mentions seeing an agitated West boarding the 8:15 train to London Bridge. Sherlock suspects West of following someone who had access to the Woolwich chief's keyring with all three keys.</p>
</section>
<section>
<h2>Gloucester Road</h2>
<p>Mycroft responds to Sherlock's telegram and mentions several spies. Hugo Oberstein of 13 Caulfield Gardens catches Sherlock's eye. He heads to the nearby Gloucester Road station to investigate and learns that the windows of Caulfield Gardens open over rail tracks where trains stop frequently.</p>
</section>
<section>
<h2>13 Caulfield Gardens</h2>
<p>Holmes deduces that the murderer placed West atop a stopped train at Caulfield Gardens. The train traveled to Aldgate Station before West's body finally toppled off. Backtracking to the criminal's apartment, Holmes finds a series of classified ads from <em>The Daily Telegraph</em> stashed away. All are under the name Pierrot: "Monday night after nine. Two taps. Only ourselves. Do not be so suspicious. Payment in hard cash when goods delivered."</p>
</section>
<section>
<h2>The Daily Telegraph</h2>
<p>Holmes and Watson head to The Daily Telegraph and place an ad to draw out the criminal. It reads: "To-night. Same hour. Same place. Two taps. Most vitally important. Your own safety at stake. Pierrot." The trap works and Holmes catches the criminal: Colonel Valentine Walter, the brother of Woolwich Arsenal's chief. He confesses to working for Hugo Oberstein to obtain the submarine plans in order to pay off his debts.</p>
</section>
<section>
<h2>Charing Cross Hotel</h2>
<p>Walter writes to Oberstein and convinces him to meet in the smoking room of the Charing Cross Hotel where he promises additional plans for the submarine in exchange for money. The plan works and Holmes and Watson catch both criminals.</p>
<small class='colophon'>
Adapted from <a href='http://www.gutenberg.org/files/2346/2346-h/2346-h.htm'>Project Gutenberg</a>
</small>
</section>
</article>
<script>
// Array of story section elements.
var sections = document.getElementsByTagName('section');
// Helper to set the active section.
var setActive = function(index, ease) {
_(sections).each(function(s) { s.className = s.className.replace(' active', '') });
sections[index].className += ' active';
return true;
};
// Bind to scroll events to find the active section.
window.onscroll = _(function() {
// IE 8
if (window.pageYOffset === undefined) {
var y = document.documentElement.scrollTop;
var h = document.documentElement.clientHeight;
} else {
var y = window.pageYOffset;
var h = window.innerHeight;
}
// If scrolled to the very top of the page set the first section active.
if (y === 0) return setActive(0, true);
// Otherwise, conditionally determine the extent to which page must be
// scrolled for each section. The first section that matches the current
// scroll position wins and exits the loop early.
var memo = 0;
var buffer = (h * 0.3333);
var active = _(sections).any(function(el, index) {
memo += el.offsetHeight;
return y < (memo-buffer) ? setActive(index, true) : false;
});
// If no section was set active the user has scrolled past the last section.
// Set the last section active.
if (!active) setActive(sections.length - 1, true);
}).debounce(10);
</script>
</body>
</html>