-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
116 lines (101 loc) · 3.84 KB
/
index.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
<html>
<head>
<title>letter thoughts</title>
<style type="text/css">
body { background: #eaeaea; }
img { width: 918px; height: 628px; }
#thing { width: 950px;
margin-left: auto;
margin-right: auto;
background: white;
padding-top: 5px;
padding-bottom: 10px;
padding-left: 20px;
padding-right: 20px;
}
div.box {
width: 918px;
height: 628px;
background: #f6f3a1;
margin-left: auto;
margin-right: auto;
}
div.l {
width: 15px;
height: 15px;
line-height: 15px;
font-size: 14px;
border: solid 1px #a1a4f6;
float: left;
text-align: center;
display: inline-block;
vertical-align: middle;
}
div.highlight {
background: #ff758b;
}
</style>
<script type="text/javascript"
src="https://code.jquery.com/jquery-1.11.1.min.js">
</script>
<script type="text/javascript">
$(document).ready(function () {
$.getJSON( "data.json", function( data ) {
$.each(data, function(val) {
str = data[val];
for(k in str){
$("#container").append("<div class='l'>" + str[k] + "</div>");
}
});
});
});
function findThought (thought) {
// This is very slow. It also keeps choosing new letters as you
// type a word, which is maybe not ideal.
var allHighlighted = $("#container div.highlight");
for(idx in allHighlighted){
$(allHighlighted[idx]).removeClass("highlight");
}
for(idx in thought){
var letter = thought[idx];
var candidates = $("#container div:contains(" + letter + ")").filter( function () {
return $(this).text() == letter;
} );
$(candidates[Math.floor(Math.random() * candidates.length)]).addClass("highlight");
}
}
</script>
</head>
<body>
<div id="thing">
<h1>letter thoughts</h1>
<div id="container" class="box">
</div>
<p>Find a thought:
<input type="text" id="look" onkeyup="findThought($('#look').val());" />
</p>
<h2>about</h2>
<div class="box" style="height: auto;">
<p>I was feeling quite stressed, and I was in possession of graph
paper. So I started writing down letters, randomly, but in order, in
each box. But it quickly became boring and I was having trouble
randomly choosing letters. So then I started writing out the alphabet
in order, at "random" positions in the grid. This was fun, and I wrote
the alphabet down forwards and backwards several times.</p>
<p>However, this also became boring. Then I realised I could write
down ideas that were running around in my head; things that I didn't
really want to think about, but was thinking about. It was actually
quite relaxing to be able to express these thoughts on paper, but not
in a way that anyone else could recognise.</p>
<p>So now this grid exists, containing a whole bunch of letters in no
particular order, and then a whole bunch that meant something to me,
but are now completely unrecoverable.</p>
</div>
<h2>physical</h2>
<div class="box"> <img src="wip-1.jpg" /> </div>
<div class="box"> <img src="wip-2.jpg" /> </div>
<div class="box"> <img src="finished.jpg" /> </div>
<div style='text-align: right; padding: 5px;'>ن</div>
</div>
</body>
</html>