index.html 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  5. <title>OliveTin</title>
  6. <link rel = "stylesheet" type = "text/css" href = "style.css" />
  7. <link rel = "shortcut icon" type = "image/png" href = "OliveTinLogo.png" />
  8. <link rel = "apple-touch-icon" sizes="57x57" href="OliveTinLogo-57px.png" />
  9. <link rel = "apple-touch-icon" sizes="120x120" href="OliveTinLogo-120px.png" />
  10. <link rel = "apple-touch-icon" sizes="180x180" href="OliveTinLogo-180px.png" />
  11. </head>
  12. <body>
  13. <main title = "main content">
  14. <div id = "perma-widget" hidden>
  15. <div id = "sidebar-toggle-wrapper">
  16. <label for = "sidebar-toggler" id = "sidebar-toggler-button" title = "Toggle sidebar" tabindex = "0">&#9776;</label>
  17. </div>
  18. <h1 id = "page-title">OliveTin</h1>
  19. </div>
  20. <div id = "content-sidebar">
  21. <input type = "checkbox" id = "sidebar-toggler" hidden checked />
  22. <aside>
  23. <ul>
  24. <li>Foo</li>
  25. <li>Bar</li>
  26. </ul>
  27. </aside>
  28. </div>
  29. <fieldset id = "section-switcher" title = "Sections">
  30. <button id = "showActions">Actions</button>
  31. <button id = "showLogs">Logs</button>
  32. </fieldset>
  33. <section id = "contentLogs" title = "Logs" hidden>
  34. <table title = "Logs">
  35. <thead>
  36. <tr>
  37. <th>Timestamp</th>
  38. <th>Log</th>
  39. <th>Exit Code</th>
  40. </tr>
  41. </thead>
  42. <tbody id = "logTableBody" />
  43. </table>
  44. </section>
  45. <section id = "contentActions" title = "Actions" hidden >
  46. <fieldset id = "root-group" title = "Dashboard of buttons">
  47. </fieldset>
  48. </section>
  49. <noscript>
  50. <div class = "error">Sorry, JavaScript is required to use OliveTin.</div>
  51. </noscript>
  52. </main>
  53. <footer title = "footer">
  54. <p><img title = "application icon" src = "OliveTinLogo.png" height = "1em" class = "logo" /> OliveTin</p>
  55. <p>
  56. <a href = "https://docs.olivetin.app" target = "_new">Documentation</a> |
  57. <a href = "https://github.com/OliveTin/OliveTin/issues/new/choose" target = "_new">Raise an issue on GitHub</a> |
  58. <span id = "currentVersion">Version: ?</p>
  59. <a id = "available-version" href = "http://olivetin.app" target = "_blank" hidden>?</a>
  60. </p>
  61. </footer>
  62. <template id = "tplArgumentForm">
  63. <form class = "action-arguments">
  64. <div class = "wrapper">
  65. <div>
  66. <span class = "icon" role = "icon"></span>
  67. <h2>Argument form</h2>
  68. </div>
  69. <div class = "arguments"></div>
  70. <div class = "buttons">
  71. <input name = "start" type = "submit" value = "Start">
  72. <button name = "cancel">Cancel</button>
  73. </div>
  74. </div>
  75. <form>
  76. </template>
  77. <template id = "tplActionButton">
  78. <button>
  79. <span role = "icon" title = "button icon" class = "icon">&#x1f4a9;</span>
  80. <p role = "title" class = "title">Untitled Button</p>
  81. </button>
  82. </template>
  83. <template id = "tplLogRow">
  84. <tr class = "log-row">
  85. <td class = "timestamp">?</td>
  86. <td>
  87. <span class = "icon" role = "icon"></span>
  88. <span class = "content">?</span>
  89. <details>
  90. <summary>stdout</summary>
  91. <pre class = "stdout">
  92. ?
  93. </pre>
  94. </details>
  95. <details>
  96. <summary>stderr</summary>
  97. <pre class = "stderr">
  98. ?
  99. </pre>
  100. </details>
  101. <div class = "tags"></div>
  102. </td>
  103. <td class = "exit-code">?</td>
  104. </tr>
  105. </template>
  106. <script type = "text/javascript">
  107. /**
  108. This is the bootstrap code, which relies on very simple, old javascript
  109. to at least display a helpful error message if we can't use OliveTin.
  110. */
  111. function showBigError (type, friendlyType, message) {
  112. clearInterval(window.buttonInterval)
  113. console.error('Error ' + type + ': ', message)
  114. const domErr = document.createElement('div')
  115. domErr.classList.add('error')
  116. domErr.innerHTML = '<h1>Error ' + friendlyType + '</h1><p>' + message + "</p><p><a href = 'http://docs.olivetin.app/err-" + type + ".html' target = 'blank'/>" + type + " error in OliveTin Documentation</a></p>"
  117. document.getElementById('root-group').appendChild(domErr)
  118. }
  119. </script>
  120. <script type = "text/javascript" nomodule>
  121. showBigError("js-modules-not-supported", "Sorry, your browser does not support JavaScript modules.", null)
  122. </script>
  123. <script type = "module" src = "main.js"></script>
  124. <script type = "module" src = "js/websocket.js"></script>
  125. </body>
  126. </html>