Advertisement
Guest User

Untitled

a guest
Apr 20th, 2014
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.01 KB | None | 0 0
  1. <link rel="stylesheet" href="/styles/bootstrap-combined.min2.css">
  2. <style type="text/css">
  3. body {
  4. margin: 0;
  5.  
  6. }
  7. #topbar{
  8. position: fixed;
  9. left: 4px;
  10. right: 4px;
  11. top: -4px;
  12. overflow: hidden;
  13. background-color: #3a3631;
  14. height: 35px;
  15. border: 2px #4f4b45 solid;
  16. border-radius:5px;
  17. }
  18.  
  19. .topbarfixed{
  20. position: absolute;
  21. left: 0px;
  22. right: 0px;
  23. top: -4px;
  24. overflow: hidden;
  25. background-color: #5A534F;
  26. height: 35px;
  27. border-bottom: 2px #7A7573 solid;
  28. font-size:14px;
  29. color:white;
  30. font-family:Geneva, sans-serif;
  31. }
  32.  
  33. #topnavi {
  34. line-height:33px;
  35. width:100%
  36. }
  37.  
  38. #topnavi ul {
  39. margin:0 179px 0 2px;
  40. }
  41.  
  42. #topnavi ul li {
  43. float:left;
  44. font-weight:bold;
  45. font-size:16px;
  46. height:35px;
  47. padding-top:5px;
  48. padding-right: 0.8em;
  49. margin-right: 0.8em;
  50. border-right: 1px solid #726A64;
  51. }
  52.  
  53. #topnavi ul li a {
  54. color: white;
  55. text-decoration: none;
  56. }
  57.  
  58. #topnavi ul li a:hover {
  59. color: white;
  60. text-decoration: underline;
  61. }
  62. html, #client {
  63. height: 96%;
  64. text-align: left;
  65. background-color: #000;
  66. }
  67.  
  68. #client {
  69. position: fixed;
  70. overflow: hidden;
  71. left: 0;
  72. top: 35;
  73. right: 0;
  74. bottom: 0;
  75. }
  76. </style>
  77.  
  78.  
  79. <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
  80. <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
  81. <script>
  82. function UpdateStats()
  83. {
  84. var health = 101;
  85. $.ajax({ type: "GET", url: "{url}/yo", cache: false }).done(function( newhealth )
  86. {
  87. if(health != newhealth)
  88. {
  89. health = newhealth;
  90. $("#hbar").css({width: newhealth + "%"}).animate({ width: newhealth + "%" }, 1000 );
  91. $("#hbar").html(newhealth);
  92. }
  93. });
  94.  
  95. var energy = 101;
  96. $.ajax({ type: "GET", url: "{url}/yo2", cache: false }).done(function( newenergy )
  97. {
  98. if(energy != newenergy)
  99. {
  100. energy = newenergy;
  101. $("#ebar").css({width: newenergy + "%"}).animate({ width: newenergy + "%" }, 1000 );
  102. $("#ebar").html(newenergy);
  103. }
  104. });
  105. }
  106. setInterval( "UpdateStats()", 100);
  107.  
  108. </script>
  109.  
  110. <div id="topbar">
  111. <div id="stats">
  112. <div style="padding:4px;">
  113. <div id="bars" style="width:100%;font-size:14px;color:white;font-family:verdana"></div>
  114. </div>
  115. </div>
  116. </div>
  117. <style type="text/css">
  118. * { margin: 0; padding: 0; }
  119. html, #client { height: 94.9%; text-align: left; }
  120. #client { position: absolute; overflow: hidden; left: 0; top: 35; right: 0; bottom: 0; }
  121.  
  122. </style>
  123.  
  124. <body>
  125. <div id="client" style="vertical-align:bottom;"></div>
  126. <div id="topbar">
  127. <div style="padding:7px;">
  128. <div class="progress progress-danger" style="width:49.5%;float:left;background-color:#3a3631;">
  129. <div id="hbar" class="bar">
  130. </div>
  131. </div>
  132. <div class="progress progress-info" style="width:49.5%;float:right;background-color:#3a3631;">
  133. <div id="ebar" class="bar">
  134. </div>
  135. </div>
  136. </div>
  137. </div>
  138.  
  139. </body>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement