index.html 2.4 KB

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