Class: PanicBoardData::SingleValue
- Inherits:
-
Object
- Object
- PanicBoardData::SingleValue
- Defined in:
- lib/panic_board_data/single_value.rb
Instance Method Summary collapse
-
#initialize(heading, value) ⇒ SingleValue
constructor
A new instance of SingleValue.
- #to_html ⇒ Object
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_html ⇒ Object
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 "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">\n <head>\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf8\" />\n <meta http-equiv=\"Cache-control\" content=\"no-cache\" />\n <style type=\"text/css\">\n @font-face\n {\nfont-family: \"Roadgeek2005SeriesD\";\nsrc: url(\"http://panic.com/fonts/Roadgeek 2005 Series D/Roadgeek 2005 Series D.otf\");\n }\n \n body, *\n {}\n\n body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td\n { margin: 0; padding: 0; }\n\n fieldset,img\n { border: 0; }\n\n html, body, #main\n { overflow: hidden; }\n\n body\n { color: white; font-family: 'Roadgeek2005SeriesD', sans-serif; font-size: 20px; line-height: 24px; }\n\n body, html, #main\n { background: transparent !important; }\n \n #Container\n { text-align: center; }\n\n #Container *\n { font-weight: normal; }\n \n h1\n { font-size: 120px; line-height: 120px; margin-top: 15px;\nmargin-bottom: 0px; color: white;\n text-shadow:0px -2px 0px black; text-transform: uppercase; }\n \n h2\n { margin: 0px auto; padding-top: 20px; font-size: 16px;\nline-height: 18px; color: #7e7e7e; text-transform: uppercase; }\n </style>\n \n <script type=\"text/javascript\">\n function init()\n {\n if (document.location.href.indexOf('desktop') > -1)\n document.getElementById('Container').style.backgroundColor = 'black';\n }\n </script>\n </head>\n \n <body onload=\"init()\">\n <div id=\"main\">\n <div id=\"Container\">\n<h2>\#{@heading}</h2>\n<h1 id=\"howmany\">\#{@value}</h1>\n </div>\n </div>\n </body>\n</html>\n" end |