-
Notifications
You must be signed in to change notification settings - Fork 0
/
story1.html
327 lines (264 loc) · 13.9 KB
/
story1.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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
<html>
<head>
<title>Surveillance Stories</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<link href='http://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Lato:100,300,400,700,900,100italic,300italic,400italic,700italic,900italic' rel='stylesheet' type='text/css'>
<style type="text/css">
body {
margin:1em;
padding:0;
font-family:'Lato';
font-weight: 300;
font-size:100%;
line-height:175%;
width:100%;
}
div#main {
text-align:center;
}
div#header {
height:100px;
top:0px;
margin-left:auto;
margin-right:auto;
width:100%;
background:ccc;
position:fixed;
z-index: 1;
}
div#highlight {
/* display:none; why doesn't this work? */
z-index: 55;
position:absolute;
margin-left:20px;
height:auto;
width:300px;
background:fff;
border-radius: 3px;
}
div#story {
margin-top:120px;
margin-left:30px;
margin-right:50px;
text-align:left;
}
div.dot {
background: black;
position:absolute;
border-radius: 50%;
height:12px;
width:12px;
}
div.dot.system {
background:#D97D80;
}
div.dot.identity {
background:#FAC466;
}
div.dot.behavior {
background:#50BEFF;
}
span.annotation {
display:none;
font-size:9pt;
font-family:'Lato';
font-weight: 400;
color:#888;
text-align:left;
padding:1em;
margin:1em;
line-height: 175%;
border-radius: 3px;
}
span.annotation span.headline {
font-family: 'Montserrat';
font-weight: 700;
line-height: 100%;
font-size:20;
}
span.annotation.system {
background:#D97D80;
color:white;
}
span.annotation.identity {
background:#FAC466;
color:white;
}
span.annotation.behavior {
background:#50BEFF;
color:white;
}
/* FILTERS */
span.system {
background:#D97D80;
border-radius: 3px;
}
span.identity {
background:#FAC466;
border-radius: 3px;
}
span.identity:hover {
background:#FAC466;
}
span.behavior {
background:#50BEFF;
border-radius: 3px;
}
span.behavior:hover {
background:#50BEFF;
}
.transparent {
zoom: 1;
filter: alpha(opacity=50);
opacity: 0.5;
}
</style>
<script>
$(document).ready(
function(){
$('body').click(function(e) {
$('div#highlight').html("");
});
$(".statement").click(function(e){
// filter , click listeners .. go get everything that is class .statement (which is really filter) when it is clicked, call function (e) which is event == which can have mouse position ,et c
var offset = $(this).attr('offset'); // when clicked on it loads offset which has % value
var kid = $(this).children('span.annotation');
var newkid = kid.clone();
newkid.css({display: 'block'}); // html elements display, none, inline, block, block has most control using "position" absolute
$("div#highlight").html(newkid);
var rect = this.getBoundingClientRect() // this means: refers to the context of the variable it is executing
$("div#highlight").css({
top: rect.top+window.scrollY-50
});
e.stopPropagation();
});
function drawDots() { //
$(".dot").remove(); // empty the canvas
var statements = $(".statement"); //fetch all statements
for (var i = 0; i < statements.length; i++) { // i is 0, immediately check the conditions,
var statement = statements[i] // firststatement is the variable name is getting statement 1 which is the 2nd highlight
var rect = statement.getBoundingClientRect() // 2nd statement is the 2nd highlight, calling a fucntion on that html element that returns the total size / distances of that hightlight
if ($(statement).hasClass("system")){
className="system";
}
if ($(statement).hasClass("identity")){
className="identity";
}
if ($(statement).hasClass("behavior")){
className="behavior";
}
var dot = $('<div class="dot '+className+'"></div>') // create html elements (the dots)
$("div#dotcontainer").append(dot) // select the container, append is a jquery function that inserts a dot visually
dot.css({
top: rect.top+window.scrollY+5
}); // is semi colon needed?
}
}
drawDots(); // excuted once on load
$( window ).resize(drawDots); // if window is resized, escuted the functiont hat is draw dots
});
</script>
</head>
<body>
<div id="main">
<div id="header">
<div id="headline"></div>
<div id="body"></div>
</div>
<div id="dotcontainer"></div>
<div id="highlight">
</div>
<div id="story">
<p>
I saw what was happening,
<span class="statement system">but I didn’t know how to feel. Richard was breaking the law and risking his job for this girl.
<span class="annotation system">
<span class="headline">
Lorem ipsum dolor sit amet
</span>
<br><br>
<span class="body">
Consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</span>
</span>
</span>
<p>
He used his authority to access private information, to learn about John, to justify fears, and to contact me at my home, the only private places I had left. I wa there in the strings, just waiting to be pulled: Victim, Nicole Jones, Single, White, Female, Born 1983, Living, Austin, Texas.
</p>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam ac mauris porta, luctus mi ac, pretium velit.
<span class="statement identity">In hac habitasse platea dictumst.
<span class="annotation identity">
<span class="headline">
Lorem ipsum dolor sit amet
</span>
<br><br>
<span class="body">
Consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</span>
</span>
</span>
Aenean ut magna mi. In magna eros, adipiscing quis interdum eu, tristique quis ipsum. In hac habitasse platea dictumst. Phasellus porttitor nisl quis ultricies convallis. Sed massa lacus, dignissim sit amet feugiat a, tincidunt eu odio. Duis adipiscing lacinia arcu, ac congue est tristique quis. Donec vehicula luctus placerat. Nulla tincidunt ligula felis, vitae mattis leo pretium sit amet. Phasellus consequat, sapien vitae faucibus ullamcorper, lorem leo accumsan libero, id volutpat lectus felis sit amet ligula. Morbi tempor lacus id massa vestibulum, ut condimentum dui luctus. Praesent adipiscing consequat elit id porttitor. Vivamus a velit ac odio gravida volutpat ut vitae ante.
</p>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque varius pulvinar arcu sit amet sollicitudin. Etiam placerat est tristique diam pharetra accumsan a sed nisi.
<span class="statement behavior">Etiam facilisis sed velit a tincidunt.
<span class="annotation behavior">
<span class="headline">
When there is a way
</span>
<br><br>
<span class="body">
Consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</span>
</span>
</span>
Cras in sodales ipsum, dignissim viverra lacus. trud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat.
<span class="statement system">Ut non malesuada sapien. Donec neque mi, rhoncus eget aliquam sed, posuere vel lectus.
<span class="annotation system">
<span class="headline">
Lorem ipsum dolor sit amet
</span>
<br><br>
<span class="body">
Consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</span>
</span>
</span>
</p>
<p>
Phasellus purus leo, cursus eu quam sit amet, euismod aliquam purus. Etiam in augue ac turpis dapibus lacinia. Cras rhoncus a mi at ullamcorper. Integer gravida velit enim, at auctor lacus tristique ut. Cras ultrices tellus orci, ac pulvinar felis dictum a. Suspendisse lobortis velit ante, sit amet ultrices tortor rhoncus a. Vivamus dignissim neque massa, et imperdiet sem vehicula at. Donec lobortis placerat libero eget pharetra. Sed id imperdiet massa, eget tincidunt dolor.
</p>
<p>
Morbi diam nunc, sagittis sed fermentum lobortis, rutrum eu justo. Nam eu erat molestie, sodales lectus convallis, lobortis lorem. Vivamus ut felis rutrum,
<span class="statement behavior">consequat velit sed, onsectetur adipisicing elit, sed do eiusmod tempor
<span class="annotation behavior">
<span class="headline">
Headline!
</span>
<br><br>
<span class="body">
C incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</span>
</span>
</span>tempor erat. onec non nisl ac massa euismod faucibus. Curabitur ac lorem elit. Proin pulvinar porttitor suscipit. Phasellus congue massa non dolor tempus vulputate. Etiam id massa orci.
</p>
<p>
Donec vehicula neque nunc, et fermentum arcu tincidunt eget. Sed et nunc nulla. Morbi porttitor justo sem, dictum sollicitudin dui aliquam vitae. Donec feugiat lectus at iaculis egestas. Suspendisse dictum quis nisi vel hendrerit.
<span class="statement identity">Nam ac velit nec velit faucibus ullamcorper sed nec ante. Curabitur sagittis odio non ipsum tincidunt sagittis. Donec consequat in lacus quis consequat.
<span class="annotation identity">
<span class="headline">
Headline Two Lines TwoLines
</span>
<br><br>
<span class="body">
Consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</span>
</span>
</span>Integer eleifend leo id sapien commodo, quis fermentum quam egestas. Vivamus dolor lacus, luctus at libero ac, fringilla tempus metus. Donec eleifend blandit aliquet. Pellentesque tempus facilisis nisl, at cursus lacus adipiscing ut. Phasellus lorem risus, pharetra a eleifend ut, facilisis ac augue.
</p>
</div>
</body>
</html>