-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
167 lines (151 loc) · 5.08 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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link
rel="shortcut icon"
href="assets/icons/favicon.ico"
type="image/x-icon"
/>
<link rel="stylesheet" href="assets/css/styles.css" />
<link rel="stylesheet" href="assets/css/json-preview.css" />
<title>JSON Generator</title>
</head>
<body>
<div class="alert-message-container hide">
<p class="alert-message"></p>
</div>
<header class="header">
<h1 class="json-heading">{ JSON Generator }</h1>
</header>
<main class="main">
<form id="json-generator">
<h2>Edit JSON</h2>
<div class="carousel-arrows">
<button
type="button"
class="carousel-arrow-button"
id="left-arrow-button"
>
<svg
version="1.1"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
viewBox="0 0 512 512"
enable-background="new 0 0 512 512"
xml:space="preserve"
>
<polygon
points="213.3,205.3 213.3,77.3 0,248 213.3,418.7 213.3,290.7 512,290.7 512,205.3 "
/>
</svg>
</button>
<button
type="button"
class="carousel-arrow-button"
id="right-arrow-button"
>
<svg
version="1.1"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
viewBox="0 0 512 512"
enable-background="new 0 0 512 512"
xml:space="preserve"
>
<polygon
points="512,261.5 298.7,90.8 298.7,218.8 0,218.8 0,304.2 298.7,304.2 298.7,432.2 "
/>
</svg>
</button>
</div>
<section class="activities-basic-info">
<div>
<button type="button" id="add-activities-button">
Add Activity +
</button>
</div>
<div>
<label for="activities-title">Initial Title:</label>
<input type="text" id="activities-title" />
</div>
</section>
<section class="activities">
<div class="activity" id="a1">
<h3>Activity 1</h3>
<div class="activity-title-container">
<label for="a1-title">Title:</label>
<input type="text" id="a1-title" class="activity-title" />
</div>
<div class="activity-moreItems-container">
<label for="a1-moreItems">Is Object?</label>
<div class="more-items">
<div>
<label for="a1-moreItems-no">No</label>
<input
type="radio"
name="a1-item"
id="a1-moreItems-no"
checked
/>
</div>
<div>
<label for="a1-moreItems-yes">Yes</label>
<input type="radio" name="a1-item" id="a1-moreItems-yes" />
</div>
</div>
</div>
<div class="activity-content-container">
<label for="a1-content">Content:</label>
<textarea id="a1-content" class="activity-content"></textarea>
</div>
<div class="activity-props hide"></div>
</div>
</section>
</form>
<section class="json-preview">
<button id="clipboard-button">
<svg
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M9 5H7C5.89543 5 5 5.89543 5 7V19C5 20.1046 5.89543 21 7 21H17C18.1046 21 19 20.1046 19 19V7C19 5.89543 18.1046 5 17 5H15"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
/>
<path
d="M9 12H15"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
/>
<path
d="M9 16H12"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
/>
<path
d="M9 5C9 3.89543 9.89543 3 11 3H13C14.1046 3 15 3.89543 15 5V7H9V5Z"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
/>
</svg>
</button>
<h2 class="json-heading">JSON Preview</h2>
<pre><code id="json-preview-code">{
<span class="prop" id="initial-title-code">"initialTitle"</span>: {
<span id="activities-code"><span id="a1-code"><span class="prop" id="a1-code-prop">"a1"</span>: <span class="value string" id="a1-code-value">""</span></span></span>
}
}</code></pre>
</section>
</main>
<script type="module" src="assets/js/main.js"></script>
</body>
</html>