aboutsummaryrefslogtreecommitdiff
path: root/site/index.html
blob: ea0dd74e97e067e3e9607565ff6ebb8d27f16dc7 (plain) (blame)
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
<!doctype html>
<html>

<head>
    <meta charset="UTF-8">
    <style>
        * {
            box-sizing: border-box;
        }

        html,
        body {
            margin: 0;
            font-family: sans-serif;
            width: 100%;
            height: 100%;
            display: flex;
            flex-direction: row;
            align-items: stretch;
            justify-content: stretch;
        }

        div {
            flex: 1;
            display: flex;
            flex-direction: row;
            align-items: stretch;
            justify-content: stretch;

            border: 1px solid #f1f1f1;
            border-radius: .25em;
            padding: 1em;
            margin: 1em;
            box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
        }

        textarea {
            flex: 1;
            resize: none;
        }

        .error {
            color: red;
        }
    </style>
</head>

<body>
    <div>
        <textarea id="input" oninput="generate()" placeholder="write yaml here" oninput="parse()"></textarea>
    </div>

    <div>
        <textarea id="output" placeholder="output" readonly></textarea>
    </div>

    <script type="text/javascript" src="out.js"></script>
    <script type="text/javascript">
        function generate() {
            var str = document.getElementById("input").value
            yaml.update(str)
        }
    </script>

</body>

</html>