Class: PanicBoardData::SingleValue

Inherits:
Object
  • Object
show all
Defined in:
lib/panic_board_data/single_value.rb

Instance Method Summary collapse

Constructor Details

#initialize(heading, value) ⇒ SingleValue

Returns a new instance of SingleValue.



5
6
7
# File 'lib/panic_board_data/single_value.rb', line 5

def initialize heading, value
  @heading, @value = heading, value
end

Instance Method Details

#to_htmlObject



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
# File 'lib/panic_board_data/single_value.rb', line 9

def to_html
<<EOF
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf8" />
		<meta http-equiv="Cache-control" content="no-cache" />
		<style type="text/css">
			@font-face
			{
font-family: "Roadgeek2005SeriesD";
src: url("http://panic.com/fonts/Roadgeek 2005 Series D/Roadgeek 2005 Series D.otf");
			}
			
			body, *
			{}

			body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td
			{ margin: 0; padding: 0; }

			fieldset,img
			{ border: 0; }

			html, body, #main
			{ overflow: hidden; }

			body
			{ color: white; font-family: 'Roadgeek2005SeriesD', sans-serif; font-size: 20px; line-height: 24px; }

			body, html, #main
			{ background: transparent !important; }
			
			#Container
			{ text-align: center; }

			#Container *
			{ font-weight: normal; }
			
			h1
			{ font-size: 120px; line-height: 120px; margin-top: 15px;
margin-bottom: 0px; color: white;
    text-shadow:0px -2px 0px black; text-transform: uppercase; }
			
			h2
			{ margin: 0px auto; padding-top: 20px; font-size: 16px;
line-height: 18px; color: #7e7e7e; text-transform: uppercase; }
		</style>
	
		<script type="text/javascript">
  function init()
  {
    if (document.location.href.indexOf('desktop') > -1)
      document.getElementById('Container').style.backgroundColor = 'black';
  }
		</script>
	</head>
	
	<body onload="init()">
		<div id="main">
			<div id="Container">
<h2>#{@heading}</h2>
<h1 id="howmany">#{@value}</h1>
			</div>
		</div>
	</body>
</html>
EOF
end