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
export default async function convertResume(req: Request): Promise<Response> {
const html = `
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Resume to JSON</title>
<style>
body {
padding: 5px;
margin-top: 32px;
background-color: #2c3e50;
font-family: 'Arial', sans-serif;
color: #ecf0f1;
max-width: 624px;
margin: auto;
}
form {
display: flex;
flex-direction: column;
gap: 4px;
}
/* Spinner Styles */
.spinner {
margin: auto;
display: none;
border: 8px solid #f3f3f3;
border-radius: 50%;
border-top: 8px solid #3498db;
width: 60px;
height: 60px;
animation: spin 2s linear infinite;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
.buttons {
display: flex;
flex-direction: column;
gap: 8px;
justify-content: center;
}
.hosting {
display: flex;
flex-direction: column;
align-self: center;
}
.hosting input {
border-radius: 5px;
}
/* Copy Button Styles */
#copyButton {
align-self: center;
display: none;
margin-top: 10px;
padding: 10px 20px;
background-color: #3498db;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
}
#hostButton {
display: none;
margin-top: 10px;
padding: 10px 20px;
background-color: #2ecc71;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
}
/* API Key Input Styles */
#apiKeyInput {
display: none;
margin-top: 10px;
}
pre {
white-space: preserve;
}
</style>
</head>
<body>