summaryrefslogtreecommitdiffstats
path: root/site/index.html
blob: 665411bbed75b03c72ebd88689b57e095a021372 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<!DOCTYPE html>
<html lang='en-US'>
  <head>
    <meta charset='utf-8'>
    <title>automathon</title>
    <link rel='stylesheet' href='main.css'>
    <meta name='viewport' content='width=device-width'>
  </head>

  <body>
    <h1>automathon</h1>

    <div class='flex-col'>
      <section>
        <h2>arena</h2>
        <canvas id='arena' width='300' height='300'>
          oh no! no canvas support!
        </canvas>

        <div class='controls'>
          <button id='tick'>
            <svg version='1.1' width='30' height='20' viewbox='0 0 100 100'>
              <title>tick</title>
              <g class='step' stroke='black' stroke-width='2' fill='red'>
                <polyline points='0 0 0 100 55 50 0 0'/>
                <rect x='60' y='0' width='30' height='100'/>
              </g>
            </svg>
          </button>
          <button id='run' class='halten'>
            <svg version='1.1' width='30' height='20' viewbox='0 0 100 100'>
              <title>blinken</title>
              <g class='play' stroke='black' stroke-width='2' fill='red'>
                <polyline points='0 0 0 100 100 50 0 0'/>
              </g>
              <g class='pause' stroke='black' stroke-width='2' fill='red'>
                <rect x='0' y='0' width='40' height='100'/>
                <rect x='60' y='0' width='40' height='100'/>
              </g>
            </svg>
          </button>
          <label for='tick-rate-select'>tps:</label>
          <select id='tick-rate-select'>
            <option>5</option>
            <option>10</option>
            <option selected>15</option>
            <option>30</option>
            <option>45</option>
            <option>60</option>
          </select>
        </div> <!-- controls -->
        fps: <span id='fps'>n/a</span>
      </section> <!-- arena -->

      <section>
        <x-inspector>
          <h2>inspector</h2>
          <details open>
            <summary>source code</summary>
            <div>
              <select class='src-select'>
                <option>rob.fs</option>
                <option>fac.fs</option>
                <option>slo-fac.fs</option>
              </select>
              <button class='compile'>compile</button>
              <br>
              <div class='src' contenteditable='plaintext-only'></div>
            </div> <!-- code -->
          </details>

          <details open>
            <summary>scope</summary>
            <fieldset>
              <legend>word list</legend>
              <div class='wordlist'></div>
            </fieldset>

            <div class='state'>
              <fieldset>
                <legend>vars</legend>
                <dl class='vars'></dl>
              </fieldset>

              <fieldset>
                <legend>stack</legend>
                <ol class='stack'></ol>
              </fieldset>

              <fieldset>
                <legend>call stack</legend>
                <ol class='callstack'></ol>
              </fieldset>
            </div> <!-- state -->
          </details> <!-- scope -->
        </x-inspector>
      </section>
    </div>

    <script src='./main.mjs' type='module'></script>

    <footer>
      <address><a href='https://git.spork.org/automathon.git'>src</a></address>
    </footer>
  </body>
</html>