index.html 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <script type="text/javascript">
  5. const sources = %SOURCES%;
  6. </script>
  7. <style type="text/css">
  8. body, html {
  9. height: 100%;
  10. margin: 0em;
  11. font-family: "Fira Mono", "Roboto", monospace;
  12. }
  13. .content {
  14. height: 100%;
  15. margin: 0;
  16. display: flex;
  17. flex-direction: column;
  18. }
  19. .all {
  20. flex: 1;
  21. display: flex;
  22. overflow-y: scroll;
  23. }
  24. .all > div {
  25. border: 1px solid;
  26. width: 50%;
  27. height: 100%;
  28. max-height: 100%;
  29. }
  30. #output {
  31. padding: 1em 3em;
  32. font-size: 14pt;
  33. white-space: pre-wrap;
  34. }
  35. .panel {
  36. overflow: hidden;
  37. margin: 0;
  38. display: flex;
  39. flex-direction: column;
  40. }
  41. .outbox {
  42. background-color: #eee;
  43. }
  44. #srcbox {
  45. margin: 0;
  46. height: 100%;
  47. max-height: 100%;
  48. }
  49. #src {
  50. max-width: 100%;
  51. height: 100%;
  52. }
  53. .cm-editor {
  54. max-height: 100%;
  55. height: 100%;
  56. }
  57. #run {
  58. width: 8em;
  59. }
  60. header, footer {
  61. display: flex;
  62. justify-content: space-between;
  63. background-color: #bbb;
  64. }
  65. header > span {
  66. padding: 0.5em 2em;
  67. }
  68. footer > span {
  69. padding: 0.5em 2em;
  70. }
  71. </style>
  72. </head>
  73. <body><div class="content">
  74. <header>
  75. <span>
  76. Playground for the <a href="https://github.com/aisamanra/matzo/">Matzo Language</a>
  77. </span>
  78. <span>
  79. <select id="examples">
  80. <option value="hello">hello.matzo</option>
  81. %EXAMPLES%
  82. </select><br/>
  83. </span>
  84. </header>
  85. <div class="all">
  86. <div class="panel">
  87. <div id="srcbox">
  88. <div id="src"></div>
  89. </div>
  90. </div>
  91. <div class="outbox">
  92. <pre id="output"></pre>
  93. </div>
  94. </div>
  95. <footer>
  96. <span>
  97. random seed: <input type="text" id="seed" value="500" />
  98. </span>
  99. <span>
  100. <input type="submit" id="run" value="Reroll" />
  101. </span>
  102. </footer>
  103. <script src="dist/main.js"></script>
  104. </div></body>
  105. </html>