-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.jhtml
61 lines (52 loc) · 1.09 KB
/
example.jhtml
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
{
"head": {
"title": "An example web page written with json-html"
},
"body": {
"h3": "Hello, world!",
"p": "How are you doing today?",
"p": {
"div": {
"class": ["trivia"],
"span": {
"class": ["trivia-title"],
"innerHtml": "Did you know?"
},
"span": "that his page you are seeing uses json-html?"
}
},
// START still trying to figure out how to replicate inline tags like <a>
// option 1
"div": {
"class": "footer",
"innerHtml": {
"text": {
"text": "Click here",
"a": "https://github.com/json-html"
},
"text": "to know more!"
}
},
// option 2
"div": {
"class": "footer",
"innerHtml": {
"text": {
"a": {
"innerHtml": "Click here"
"href": "https://github.com/json-html"
}
},
"text": "to know more!"
}
},
// option 3
"div": {
"class": "footer",
"innerHtml": {
"text": "Click here to know more!"
}
// END
}
}
}