Advertisement
ErisNotEros

Part two - credit at bottom

Feb 29th, 2012
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.76 KB | None | 0 0
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2.  
  3. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4.  
  5. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  6. <head>
  7.  
  8. <meta name="text:House Points Slytherin" content="155" />
  9. <meta name="text:House Points Ravenclaw" content="125" />
  10. <meta name="text:House Points Gryffindor" content="130" />
  11. <meta name="text:House Points Hufflepuff" content="80" />
  12. <meta name="if:House Points Toggle Side" content="0" />
  13.  
  14. <title>{Title}{block:SearchPage}, {lang:Search results for SearchQuery}{/block:SearchPage}
  15.  
  16. {block:PostSummary}, {PostSummary}{/block:PostSummary}</title>
  17. {block:Description}<meta name="description" content="{MetaDescription}" />
  18.  
  19. {/block:Description}
  20. <link rel="shortcut icon" href="{Favicon}" />
  21. <link rel="apple-touch-icon" href="{PortraitURL-128}"/>
  22. <link rel="alternate" type="application/rss+xml" href="{RSS}" />
  23.  
  24. <style type="text/css">
  25.  
  26. body {background-color:#ffffff;}
  27.  
  28. img {border:none;}
  29.  
  30. #blackbg {background-color:#cbcbcb; width:100px; height:1200px;}
  31.  
  32. </style>
  33.  
  34. <script type="text/javascript">
  35.  
  36. //Background and foreground
  37. document.write ('<div style="background-image:url(http://i39.tinypic.com/2pydsew.png); width:300px; height:300px; position:fixed; bottom:0; {block:IfNotHousePointsToggleSide}right:40px;{/block:IfNotHousePointsToggleSide}{block:IfHousePointsToggleSide}left:40px;{/block:IfHousePointsToggleSide} z-index:700; border-style:solid; border-width:6px 6px 40px 6px; border-color:black;"></div>');
  38. document.write ('<div style="background-image:url(http://i39.tinypic.com/1ztf80.png); width:300px; height:300px; position:fixed; bottom:40px; {block:IfNotHousePointsToggleSide}right:46px;{/block:IfNotHousePointsToggleSide}{block:IfHousePointsToggleSide}left:46px;{/block:IfHousePointsToggleSide} z-index:703;"></div>');
  39.  
  40. //Calculates the bar hights
  41. var ptS = {text:House Points Slytherin};
  42. var ptR = {text:House Points Ravenclaw};
  43. var ptG = {text:House Points Gryffindor};
  44. var ptH = {text:House Points Hufflepuff};
  45.  
  46. function sortNumber(a,b)
  47. {return a - b;}
  48.  
  49. var points = [ptS, ptR, ptG, ptH];
  50. console.log(points.sort(sortNumber));
  51.  
  52. var Total = points[3]
  53.  
  54. var tS = Math.round(150*ptS/Total);
  55. var tR = Math.round(150*ptR/Total);
  56. var tG = Math.round(150*ptG/Total);
  57. var tH = Math.round(150*ptH/Total);
  58.  
  59. //Writes the divs for the coloured bars
  60. document.write ('<div style="height:' + tS + 'px; background-image:url(http://i39.tinypic.com/so3hvr.png); width:50px; position:fixed; bottom:81px; {block:IfNotHousePointsToggleSide}right:234px;{/block:IfNotHousePointsToggleSide}{block:IfHousePointsToggleSide}left:104px;{/block:IfHousePointsToggleSide} z-index:701;"></div>');
  61. document.write ('<div style="height:' + tR + 'px; background-image:url(http://i44.tinypic.com/2hevryt.png); width:50px; position:fixed; bottom:81px; {block:IfNotHousePointsToggleSide}right:184px;{/block:IfNotHousePointsToggleSide}{block:IfHousePointsToggleSide}left:154px;{/block:IfHousePointsToggleSide} z-index:701;"></div>');
  62. document.write ('<div style="height:' + tG + 'px; background-image:url(http://i43.tinypic.com/358nhh5.png); width:50px; position:fixed; bottom:81px; {block:IfNotHousePointsToggleSide}right:134px;{/block:IfNotHousePointsToggleSide}{block:IfHousePointsToggleSide}left:204px;{/block:IfHousePointsToggleSide} z-index:701;"></div>');
  63. document.write ('<div style="height:' + tH + 'px; background-image:url(http://i40.tinypic.com/t5rtrq.png); width:50px; position:fixed; bottom:81px; {block:IfNotHousePointsToggleSide}right:84px;{/block:IfNotHousePointsToggleSide}{block:IfHousePointsToggleSide}left:254px;{/block:IfHousePointsToggleSide} z-index:701;"></div>');
  64.  
  65. //Calculates cap heights
  66. var cS = tS+64;
  67. var cR = tR+64;
  68. var cG = tG+64;
  69. var cH = tH+64;
  70.  
  71. //Adds a round cap to each bar
  72. document.write ('<div style="background-image:url(http://i40.tinypic.com/2vagxuv.png); width:50px; height:35px; position:fixed; bottom:' + cS + 'px; {block:IfNotHousePointsToggleSide}right:234px;{/block:IfNotHousePointsToggleSide}{block:IfHousePointsToggleSide}left:109px;{/block:IfHousePointsToggleSide} z-index:702;"></div>');
  73. document.write ('<div style="background-image:url(http://i44.tinypic.com/if8shw.png); width:50px; height:35px; position:fixed; bottom:' + cR + 'px; {block:IfNotHousePointsToggleSide}right:184px;{/block:IfNotHousePointsToggleSide}{block:IfHousePointsToggleSide}left:159px;{/block:IfHousePointsToggleSide} z-index:702;"></div>');
  74. document.write ('<div style="background-image:url(http://i41.tinypic.com/2whiiqe.png); width:50px; height:35px; position:fixed; bottom:' + cG + 'px; {block:IfNotHousePointsToggleSide}right:134px;{/block:IfNotHousePointsToggleSide}{block:IfHousePointsToggleSide}left:209px;{/block:IfHousePointsToggleSide} z-index:702;"></div>');
  75. document.write ('<div style="background-image:url(http://i43.tinypic.com/1iyec5.png); width:50px; height:35px; position:fixed; bottom:' + cH + 'px; {block:IfNotHousePointsToggleSide}right:84px;{/block:IfNotHousePointsToggleSide}{block:IfHousePointsToggleSide}left:259px;{/block:IfHousePointsToggleSide} z-index:702;"></div>');
  76.  
  77. //Calculates marker heights
  78. var mS = tS+90;
  79. var mR = tR+90;
  80. var mG = tG+90;
  81. var mH = tH+90;
  82.  
  83. //Adds markers
  84. document.write ('<div style="background-image:url(http://i43.tinypic.com/nziwzb.png); width:17px; height:21px; position:fixed; bottom:' + mS + 'px; {block:IfNotHousePointsToggleSide}right:232px;{/block:IfNotHousePointsToggleSide}{block:IfHousePointsToggleSide}left:141px;{/block:IfHousePointsToggleSide} z-index:704;"></div>');
  85. document.write ('<div style="background-image:url(http://i39.tinypic.com/2z538uc.png); width:17px; height:21px; position:fixed; bottom:' + mR + 'px; {block:IfNotHousePointsToggleSide}right:179px;{/block:IfNotHousePointsToggleSide}{block:IfHousePointsToggleSide}left:196px;{/block:IfHousePointsToggleSide} z-index:704;"></div>');
  86. document.write ('<div style="background-image:url(http://i43.tinypic.com/kx7oz.png); width:17px; height:21px; position:fixed; bottom:' + mG + 'px; {block:IfNotHousePointsToggleSide}right:125px;{/block:IfNotHousePointsToggleSide}{block:IfHousePointsToggleSide}left:249px;{/block:IfHousePointsToggleSide} z-index:704;"></div>');
  87. document.write ('<div style="background-image:url(http://i40.tinypic.com/d8ajd.png); width:17px; height:21px; position:fixed; bottom:' + mH + 'px; {block:IfNotHousePointsToggleSide}right:71px;{/block:IfNotHousePointsToggleSide}{block:IfHousePointsToggleSide}left:302px;{/block:IfHousePointsToggleSide} z-index:704;"></div>');
  88.  
  89. //Credit - Please don't remove
  90. document.write ('<a href="http://youdontmeanit.tumblr.com/housepoints" style="text-decoration:none;"><p style="color:white; font-size:16px; font-family:Georgia, Serif; font-weight:700; position:fixed; bottom:4px; {block:IfNotHousePointsToggleSide}right:140px;{/block:IfNotHousePointsToggleSide}{block:IfHousePointsToggleSide}left:140px;{/block:IfHousePointsToggleSide} z-index:705;">House Points</p><p style="color:#808080; font-size:12px; font-family:Georgia, Serif; font-weight:500; position:fixed; bottom:-5px; {block:IfNotHousePointsToggleSide}right:150px;{/block:IfNotHousePointsToggleSide}{block:IfHousePointsToggleSide}left:150px;{/block:IfHousePointsToggleSide} z-index:705;">Created by Eris</p></a>');
  91.  
  92. </script>
  93.  
  94. <!--[if lt IE]>
  95. <script type="text/javascript">
  96. //Internet Explorer Error Message for the idiots who still use that browser
  97. document.write ('<div style="background-image:url(http://i42.tinypic.com/f0u2rr.png); height:300px; width:300px; position:fixed; bottom:46px; {block:IfNotHousePointsToggleSide}right:40px;{/block:IfNotHousePointsToggleSide}{block:IfHousePointsToggleSide}left:40px;{/block:IfHousePointsToggleSide} z-index:705;"></div>');
  98. </script>
  99. <![endif]-->
  100.  
  101. </head>
  102. <body>
  103.  
  104. <div id="blackbg">
  105.  
  106. <div id="Slytherin"></div>
  107.  
  108. </div>
  109.  
  110. </body>
  111. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement