index.html 2.8 KB

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