index.html 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  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-logo.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. a {
  20. color: #b9794a;
  21. font-weight: bold;
  22. }
  23. .content {
  24. height: 100%;
  25. margin: 0;
  26. display: flex;
  27. flex-direction: column;
  28. }
  29. .all {
  30. flex: 1;
  31. display: flex;
  32. overflow-y: scroll;
  33. }
  34. .all > div {
  35. width: 50%;
  36. height: 100%;
  37. max-height: 100%;
  38. }
  39. #output {
  40. padding: 1em 3em;
  41. font-size: 14pt;
  42. white-space: pre-wrap;
  43. }
  44. .panel {
  45. overflow: hidden;
  46. margin: 0;
  47. display: flex;
  48. flex-direction: column;
  49. }
  50. .outbox {
  51. background-color: #eee;
  52. }
  53. #srcbox {
  54. margin: 0;
  55. height: 100%;
  56. max-height: 100%;
  57. }
  58. #src {
  59. max-width: 100%;
  60. height: 100%;
  61. }
  62. .cm-editor {
  63. max-height: 100%;
  64. height: 100%;
  65. }
  66. #run {
  67. width: 8em;
  68. }
  69. header, footer {
  70. display: flex;
  71. justify-content: space-between;
  72. background-color: #ddd;
  73. }
  74. header > div {
  75. display: flex;
  76. align-items: center;
  77. padding: 0.5em 1em;
  78. }
  79. #logo {
  80. padding-right: 1em;
  81. }
  82. footer > span {
  83. padding: 0.5em 2em;
  84. }
  85. </style>
  86. </head>
  87. <body><div class="content">
  88. <header>
  89. <div>
  90. <img id="logo" src="./matzo-logo.svg" height="24pt">
  91. <span>Playground for the <a href="https://github.com/aisamanra/matzo/">Matzo Language</a></span>
  92. </div>
  93. <div>
  94. <select id="examples">
  95. <option value="hello">hello.matzo</option>
  96. %EXAMPLES%
  97. </select><br/>
  98. </div>
  99. </header>
  100. <div class="all">
  101. <div class="panel">
  102. <div id="srcbox">
  103. <div id="src"></div>
  104. </div>
  105. </div>
  106. <div class="outbox">
  107. <pre id="output"></pre>
  108. </div>
  109. </div>
  110. <footer>
  111. <span>
  112. random seed: <input type="text" id="seed" value="12345" />
  113. </span>
  114. <span>
  115. <input type="submit" id="run" value="Reroll" />
  116. </span>
  117. </footer>
  118. <script src="dist/main.js"></script>
  119. </div></body>
  120. </html>