-
Notifications
You must be signed in to change notification settings - Fork 1
/
template.rb
77 lines (70 loc) · 2.34 KB
/
template.rb
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
class Display
def header
"<!DOCTYPE html>
<html>
<head>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />
<title>Cut Up</title>
<link rel=\"stylesheet\" type=\"text/css\" href=\"/stylesheets/cut.css\" />
<!--[if IE]>
<link rel=\"stylesheet\" type=\"text/css\" href=\"cut_ie.css\" />
<![endif]-->
<script language=\"JavaScript\" type=\"text/JavaScript\" src=\"\"></script>
</head>
<body>
<div id=\"title\">
<a class=\"none\" href=\"../\">The Cut-up Method</a>
</div>
<div id=\"headBand\">
<div id=\"headItem\"><a href=\"../\">HOME</a></div>
<div id=\"headItem\"><a href=\"how\">HOW THIS WORKS</a></div>
<div id=\"headItem\"><a href=\"history_of_cutup\">HISTORY OF CUT-UP</a></div>
<div id=\"headItem\"><a href=\"thedocument\">THE DOCUMENT</a></div>
</div>
<div id=\"container\">"
end
def footer
"</div>
</body>
</html>"
end
def html(entry=[], f ="none")
"#{ self.header }
<div id=\"image_left\"><img src=\"images/typewriter.jpg\">
</div>
<div id=\"quote\">
<p> \"If you have a prerecorded universe in which everything is already prerecorded,
the only thing that is not prerecorded are the prerecordings themselves. So with my cut-ups
I was attempting to tamper with the basic prerecordings and I think
I have succeeded to some modest extent.\"
-<i>William S. Burroughs</i>
</p>
</div>
<div id=\"cutup\">
<p><form name=\"input\" action=\"\" method=\"post\">
<textarea name=\"cut\" cols=\"49\" rows=\"11\" onclick=\"document.input.cut.value='';\">Enter text to be cut-up here
</textarea>
<br />
<p> <input type=\"submit\" value=\"Cut This Up\" /></p>
</form></p>
<p> #{ entry.join(" ") } </p>
<p> #{ submit_form(f) } </p>
</div>
#{ self.footer }"
end
def submit_form(f)
if f == "form"
"<form name=\"commit\" action=\"process\" method=\"post\">
<input type=\"submit\" value=\"Commit to The Document\" />
</form> <br />"
else
""
end
end
def doc_html(title,doc)
"#{ self.header }
<p class=\"center\"><b>#{ title }</b></p>
<p> #{ doc } </p>
#{ self.footer }"
end
end