Add 3 files
Browse files- app.css +77 -0
- index.html +3 -19
- main.js +14 -0
app.css
ADDED
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#text-box {
|
2 |
+
position: absolute;
|
3 |
+
top: 50%;
|
4 |
+
left: 50%;
|
5 |
+
transform: translate(-50%, -50%);
|
6 |
+
width: 500px;
|
7 |
+
height: 300px;
|
8 |
+
border-radius: 20px;
|
9 |
+
text-align: center;
|
10 |
+
background: white;
|
11 |
+
font-family: Arial;
|
12 |
+
font-size: 20px;
|
13 |
+
font-weight: bold;
|
14 |
+
}
|
15 |
+
|
16 |
+
#text-box .start-text {
|
17 |
+
display: none;
|
18 |
+
}
|
19 |
+
|
20 |
+
#text-box .stop-text {
|
21 |
+
display: none;
|
22 |
+
}
|
23 |
+
|
24 |
+
#text-box .play-icon {
|
25 |
+
width: 20px;
|
26 |
+
height: 20px;
|
27 |
+
vertical-align: middle;
|
28 |
+
margin-left: 10px;
|
29 |
+
}
|
30 |
+
|
31 |
+
#text-box .pause-icon {
|
32 |
+
width: 20px;
|
33 |
+
height: 20px;
|
34 |
+
vertical-align: middle;
|
35 |
+
margin-left: 10px;
|
36 |
+
}
|
37 |
+
|
38 |
+
#text-box .recording-icon {
|
39 |
+
width: 20px;
|
40 |
+
height: 20px;
|
41 |
+
vertical-align: middle;
|
42 |
+
margin-left: 10px;
|
43 |
+
}
|
44 |
+
|
45 |
+
#text-box .text-box-input {
|
46 |
+
width: 100%;
|
47 |
+
height: 200px;
|
48 |
+
resize: none;
|
49 |
+
margin-top: 50px;
|
50 |
+
padding: 10px;
|
51 |
+
border: none;
|
52 |
+
border-radius: 20px;
|
53 |
+
background: rgba(0, 0, 0, 0.1);
|
54 |
+
font-size: 20px;
|
55 |
+
}
|
56 |
+
|
57 |
+
#text-box .text-box-button {
|
58 |
+
position: absolute;
|
59 |
+
bottom: 20px;
|
60 |
+
right: 20px;
|
61 |
+
width: 100px;
|
62 |
+
height: 50px;
|
63 |
+
background: rgba(0, 0, 0, 0.1);
|
64 |
+
border: none;
|
65 |
+
border-radius: 20px;
|
66 |
+
color: white;
|
67 |
+
font-size: 20px;
|
68 |
+
font-weight: bold;
|
69 |
+
}
|
70 |
+
|
71 |
+
#text-box .text-box-button:focus {
|
72 |
+
background: rgba(0, 0, 0, 0.2);
|
73 |
+
}
|
74 |
+
|
75 |
+
#text-box .text-box-button:hover {
|
76 |
+
background: rgba(0, 0, 0, 0.3);
|
77 |
+
}
|
index.html
CHANGED
@@ -1,19 +1,3 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
<meta charset="utf-8" />
|
5 |
-
<meta name="viewport" content="width=device-width" />
|
6 |
-
<title>My static Space</title>
|
7 |
-
<link rel="stylesheet" href="style.css" />
|
8 |
-
</head>
|
9 |
-
<body>
|
10 |
-
<div class="card">
|
11 |
-
<h1>Welcome to your static Space!</h1>
|
12 |
-
<p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
|
13 |
-
<p>
|
14 |
-
Also don't forget to check the
|
15 |
-
<a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
|
16 |
-
</p>
|
17 |
-
</div>
|
18 |
-
</body>
|
19 |
-
</html>
|
|
|
1 |
+
<html><head><link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/full.css" rel="stylesheet" type="text/css" /><script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/cdn.min.js"></script><script src="https://cdn.tailwindcss.com?plugins=forms,typography,aspect-ratio"></script><script defer src="https://cdnjs.cloudflare.com/ajax/libs/three.js/0.156.1/three.min.js"></script><script type="module" src="main.js"></script><title>Text Recorder</title></head><body>
|
2 |
+
|
3 |
+
</body></html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
main.js
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
// Register a new Alpine component
|
2 |
+
Alpine.data({
|
3 |
+
recording: false,
|
4 |
+
text: '',
|
5 |
+
speechToText() {
|
6 |
+
// Some code to implement speech to text functionality
|
7 |
+
},
|
8 |
+
startRecording() {
|
9 |
+
this.recording = true;
|
10 |
+
},
|
11 |
+
stopRecording() {
|
12 |
+
this.recording = false;
|
13 |
+
}
|
14 |
+
});
|