-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
137 lines (126 loc) · 5.79 KB
/
index.html
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
<!doctype html>
<html lang="en" data-theme="dark">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="icon" type="image/png" sizes="32x32" href="assets/J2V-48x48.ico">
<title>JsonToVlang</title>
<link rel="stylesheet" type='text/css' href="https://cdn.jsdelivr.net/gh/devicons/devicon@latest/devicon.min.css" />
<link rel="stylesheet" href="css/pico/pico.min.css">
<link rel="stylesheet" href="css/custom/root.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Ruda:wght@500&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@500&display=swap" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.5/lodash.js"></script>
</head>
<body>
<article class="options">
<nav>
<ul>
<li></li>
<li>
<label data-tooltip="Vlang.io" data-placement="bottom">
<a href="https://vlang.io" target="_blank">
<div class="icon-container">
<div class="icon-background">
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em"
viewBox="0 0 32 32">
<path fill="#536b8a"
d="m20.467 29.288l9.485-26.375a.5.5 0 0 0-.566-.728l-7.459.715a1.46 1.46 0 0 0-1.141.9l-8.779 25.206a.573.573 0 0 0 .578.813h7.26a.66.66 0 0 0 .577-.4Z" />
<path fill="#5d87bf"
d="m2.614 2.185l7.459.719a1.47 1.47 0 0 1 1.142.9l8.965 25.609a.286.286 0 0 1-.289.406h-7.306a1.31 1.31 0 0 1-1.152-.81L2.048 2.913a.5.5 0 0 1 .566-.728" />
</svg>
</div>
</div>
</a>
</label>
</li>
<li>
<label data-tooltip="Json2V" data-placement="bottom">
<a href="https://github.com/Ddiidev/Json2V" target="_blank">
<div class="icon-container">
<div class="icon-background">
<i class="devicon-github-original" style="width: 64px; height: 64px;"></i>
</div>
</div>
</a>
</label>
</li>
<li>
<label data-tooltip="Json2V Tool CLI Vlang" data-placement="bottom">
<a href="https://github.com/Ddiidev/Json2VStruct" target="_blank">
<img src="assets/J2V-48x48.ico">
</a>
</label>
</li>
</ul>
<ul>
<li>
<label data-placement="bottom" data-tooltip="Field omitted if field value is empty"
for="ck_omitempty">
<input type="checkbox" id="ck_omitempty" name="ck_omitempty" onclick="loadFlags()" checked>
omitempty
</label>
</li>
<li>
<label data-placement="bottom"
data-tooltip="Reserved words will be added an '@' instead of a '_' E.g. type = @type"
for="ck_reserved_word">
<input type="checkbox" id="ck_reserved_word" onclick="loadFlags()" name="ck_reserved_word">
reserved word with @
</label>
</li>
<li>
<label data-placement="bottom" data-tooltip="Anonymous struct instead of a helper struct"
for="ck_struct_anon">
<input type="checkbox" id="ck_struct_anon" onclick="loadFlags()" name="ck_struct_anon">
struct anonymous
</label>
</li>
</ul>
<ul></ul>
<ul></ul>
</nav>
</article>
<div id="app">
<div class="container-fluid main-app">
<div class="grid" style="display: grid; height: 80%; padding: -15px;">
<article style="text-align: center;">
<h2>JSON</h2>
<div id="editorJson"></div>
</article>
<article style="text-align: center;">
<h2>Vlang</h2>
<div id="editorVlang"></div>
</article>
</div>
</div>
</div>
<script>
window.onerror = function (msg, url, line, col, err) {
return true
}
</script>
<script src="./ace-builds/src-min/ace.js" type="text/javascript" charset="utf-8"></script>
<script defer src="./types.js"></script>
<script defer src="./validations.js"></script>
<script defer src="./resolvers.js"></script>
<script defer src="./index.js"></script>
</body>
<style>
.icon-container {
border-radius: 10px;
display: inline-block;
padding: 10px;
padding-left: 13px;
padding-right: 13px;
background-color: #242938;
transition: background-color 0.3s;
}
</style>
</html>