4
4
< meta name ="viewport " content ="width=device-width, initial-scale=1.0 " />
5
5
6
6
< title > CodeBedder - simplest code editor on the web</ title >
7
- < meta name ="description " content ="An HTML web component that makes it easy to add code editing to any website " />
8
- < meta name ="og:title " content ="CodeBedder - simplest code editor on the web " />
9
- < meta name ="og:description " content ="An HTML web component that makes it easy to add code editing to any website " />
7
+ < meta
8
+ name ="description "
9
+ content ="An HTML web component that makes it easy to add code editing to any website "
10
+ />
11
+ < meta
12
+ name ="og:title "
13
+ content ="CodeBedder - simplest code editor on the web "
14
+ />
15
+ < meta
16
+ name ="og:description "
17
+ content ="An HTML web component that makes it easy to add code editing to any website "
18
+ />
10
19
< meta name ="og:image " content ="screenshot.png " />
11
20
12
21
< link rel ="icon " type ="image/svg+xml " href ="logo.svg " />
44
53
👀 Try
45
54
</ a >
46
55
47
- < a href ="#why " data-title ="Why you might want to use it, and why not ">
56
+ < a
57
+ href ="#why "
58
+ data-title ="Why you might want to use CodeBedder (or not) "
59
+ >
48
60
🤔 Why
49
61
</ a >
50
62
@@ -154,7 +166,7 @@ <h2 id="buy">Need more guidance?</h2>
154
166
</ div >
155
167
156
168
< div style ="flex: 3 ">
157
- < dt > 🏠 Plus</ dt >
169
+ < dt > 🌷 Plus</ dt >
158
170
< dd data-price ="$500 ">
159
171
We'll help you set up a CodeBedder editor for
160
172
< b > any language</ b > with a < b > custom preview</ b > in up to
@@ -171,10 +183,10 @@ <h2 id="buy">Need more guidance?</h2>
171
183
</ div >
172
184
173
185
< div style ="flex: 2 ">
174
- < dt > 🏢 Enterprise </ dt >
186
+ < dt > ✨ Xtra </ dt >
175
187
< dd data-price ="$??? ">
176
- Got < b > many pages</ b > ? Need a < b > more advanced </ b > preview
177
- functionality?
188
+ Got < b > many pages</ b > in need of a code editor? Need a
189
+ < b > more advanced </ b > preview functionality?
178
190
179
191
< p > Or some < b > custom feature</ b > you're missing from CodeBedder?</ p >
180
192
@@ -194,14 +206,15 @@ <h2 id="buy">Need more guidance?</h2>
194
206
< dialog
195
207
onclick ="if (event.target === this) this.close() "
196
208
onclose ="
197
- if (this.returnValue === 'save ') {
198
- // TODO: Error handling
209
+ if (this.returnValue === 'submit ') {
210
+ this.returnValue = '';
199
211
fetch('/', {
200
212
method: 'POST',
201
213
body: new URLSearchParams(new FormData(document.forms.contact)).toString(),
202
214
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
215
+ }).catch((error) => {
216
+ window.alert(error.toString());
203
217
});
204
- this.returnValue = '';
205
218
}
206
219
"
207
220
>
@@ -214,11 +227,13 @@ <h2 id="buy">Need more guidance?</h2>
214
227
×
215
228
</ button >
216
229
230
+ <!-- TODO: Remove if email works without it -->
217
231
< input type ="hidden " name ="form-name " value ="contact " />
218
- < input type ="email " name ="email " placeholder ="Email " />
232
+ < input type ="email " name ="email " placeholder ="Email " required />
219
233
< textarea
220
234
name ="text "
221
235
placeholder ="Tell us more about your use case "
236
+ required
222
237
> </ textarea >
223
238
224
239
< div class ="toolbar ">
@@ -230,7 +245,19 @@ <h2 id="buy">Need more guidance?</h2>
230
245
Cancel
231
246
</ button >
232
247
233
- < button type ="submit " value ="save "> Save</ button >
248
+ < button
249
+ type ="submit "
250
+ value ="submit "
251
+ onclick ="
252
+ if (!document.forms.contact.checkValidity()) {
253
+ ['email', 'text'].forEach((name) => {
254
+ document.forms.contact[name].setAttribute('data-dirty', true)
255
+ });
256
+ }
257
+ "
258
+ >
259
+ Send
260
+ </ button >
234
261
</ div >
235
262
</ form >
236
263
</ dialog >
0 commit comments