Skip to content

Commit 348843b

Browse files
committed
Add index.html
1 parent 6e62b71 commit 348843b

File tree

3 files changed

+41
-54
lines changed

3 files changed

+41
-54
lines changed

.github/workflows/jekyll-gh-pages.yml

Lines changed: 0 additions & 51 deletions
This file was deleted.

docs/_config.yml

Lines changed: 0 additions & 3 deletions
This file was deleted.

index.html

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>Custom Language → JSON</title>
6+
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">
7+
<style>
8+
body { padding: 50px; background-color: #f7f9fc; }
9+
textarea { width: 100%; height: 200px; margin-bottom: 20px; font-family: monospace; }
10+
h1 { margin-bottom: 30px; }
11+
</style>
12+
</head>
13+
<body>
14+
<div class="container">
15+
<h1>Custom Language → JSON Converter</h1>
16+
<textarea id="input" placeholder="Write your custom language here..."></textarea>
17+
<textarea id="output" placeholder="JSON output..." readonly></textarea>
18+
<button class="btn btn-primary" onclick="convert()">Convert</button>
19+
</div>
20+
21+
<script>
22+
function convert() {
23+
const input = document.getElementById('input').value;
24+
// Example parser (replace with your real language parser)
25+
try {
26+
const lines = input.split('\n');
27+
const json = {};
28+
lines.forEach(line => {
29+
if (line.includes('=')) {
30+
const [key, value] = line.split('=').map(s => s.trim());
31+
json[key] = value;
32+
}
33+
});
34+
document.getElementById('output').value = JSON.stringify(json, null, 2);
35+
} catch (e) {
36+
document.getElementById('output').value = 'Error: ' + e.message;
37+
}
38+
}
39+
</script>
40+
</body>
41+
</html>

0 commit comments

Comments
 (0)