embedded_body.html 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <!-- This page is used as an iframe in the main page -->
  2. <!-- This allows it to auto-refresh without interrupting the bouncing -->
  3. <meta http-equiv="refresh" content="{{ refresh_rate }}">
  4. <style>
  5. h1 {
  6. font-size: 24px;
  7. line-height: 44px;
  8. font-weight: bold;
  9. margin-top: 0;
  10. margin-bottom: 0;
  11. }
  12. h2 {
  13. font-size: 18px;
  14. line-height: 20px;
  15. margin-top: 0;
  16. margin-left: 15px;
  17. margin-bottom: -10px;
  18. }
  19. </style>
  20. <script type="text/javascript">
  21. // Inherits the styling from the page embedding this
  22. window.onload = function() {
  23. if (parent) {
  24. var oHead = document.getElementsByTagName("head")[0];
  25. var arrStyleSheets = parent.document.getElementsByTagName("style");
  26. for (var i = 0; i < arrStyleSheets.length; i++)
  27. oHead.appendChild(arrStyleSheets[i].cloneNode(true));
  28. }
  29. }
  30. </script>
  31. <body>
  32. <h1>TeamSpeak Server Status</h1>
  33. {% if users|length == 0 %}
  34. No one in teamspeak!
  35. {% else %}
  36. {% for channel, people in users.items() %}
  37. <h2>{{ channel }}</h2>
  38. <ul>
  39. {% for user in people %}
  40. <li>{{ user }}</li>
  41. {% endfor %}
  42. </ul>
  43. {% endfor %}
  44. {% endif %}
  45. </body>