Spaces:
Running
Running
Update templates/index.html
Browse files- templates/index.html +228 -224
templates/index.html
CHANGED
@@ -1,224 +1,228 @@
|
|
1 |
-
<!DOCTYPE html>
|
2 |
-
<html lang="ja">
|
3 |
-
<head>
|
4 |
-
<meta charset="UTF-8" />
|
5 |
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
6 |
-
<title>JustTalk - Voice Analysis</title>
|
7 |
-
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
8 |
-
<script src="https://cdn.tailwindcss.com"></script>
|
9 |
-
<link
|
10 |
-
rel="stylesheet"
|
11 |
-
href="https://use.fontawesome.com/releases/v5.10.0/css/all.css"
|
12 |
-
/>
|
13 |
-
<style>
|
14 |
-
/* Custom Chart.js Styles */
|
15 |
-
#speechChart {
|
16 |
-
background-color: rgba(255, 255, 255, 0.05);
|
17 |
-
border-radius: 10px;
|
18 |
-
padding: 10px;
|
19 |
-
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
|
20 |
-
}
|
21 |
-
|
22 |
-
/* Record Button Styles */
|
23 |
-
.record-button {
|
24 |
-
width: 90px;
|
25 |
-
height: 90px;
|
26 |
-
background-color: transparent;
|
27 |
-
border-radius: 50%;
|
28 |
-
border: 5px solid white;
|
29 |
-
display: flex;
|
30 |
-
justify-content: center;
|
31 |
-
align-items: center;
|
32 |
-
cursor: pointer;
|
33 |
-
box-shadow: 0 6px 10px rgba(0, 0, 0, 0.5);
|
34 |
-
transition: all 0.2s ease;
|
35 |
-
}
|
36 |
-
|
37 |
-
.record-icon {
|
38 |
-
width: 70px;
|
39 |
-
height: 70px;
|
40 |
-
background-color: #e53e3e;
|
41 |
-
border-radius: 50%;
|
42 |
-
transition: all 0.2s ease;
|
43 |
-
}
|
44 |
-
|
45 |
-
.recording .record-icon {
|
46 |
-
width: 50px;
|
47 |
-
height: 50px;
|
48 |
-
border-radius: 15%;
|
49 |
-
background-color: #c53030;
|
50 |
-
}
|
51 |
-
|
52 |
-
.icon i {
|
53 |
-
font-size: 24px;
|
54 |
-
}
|
55 |
-
|
56 |
-
/* Hamburger Menu Styles */
|
57 |
-
#menu {
|
58 |
-
position: absolute;
|
59 |
-
top: 0;
|
60 |
-
left: 0;
|
61 |
-
z-index: 10;
|
62 |
-
transform: translateX(-100%);
|
63 |
-
visibility: hidden;
|
64 |
-
opacity: 0;
|
65 |
-
background-color: rgb(31, 41, 55);
|
66 |
-
transition: transform 0.3s ease-in-out, visibility 0s 0.3s,
|
67 |
-
opacity 0.3s ease-in-out;
|
68 |
-
backdrop-filter: blur(10px);
|
69 |
-
border-right: 1px solid rgba(255, 255, 255, 0.2);
|
70 |
-
}
|
71 |
-
|
72 |
-
#menu.open {
|
73 |
-
transform: translateX(0);
|
74 |
-
visibility: visible;
|
75 |
-
opacity: 1;
|
76 |
-
transition: transform 0.3s ease-in-out, visibility 0s 0s,
|
77 |
-
opacity 0.3s ease-in-out;
|
78 |
-
}
|
79 |
-
|
80 |
-
#menu button {
|
81 |
-
transition: background-color 0.2s ease;
|
82 |
-
background-color: rgba(0, 0, 0, 0.1); /* 変更点: 透明度を 10% に変更 */
|
83 |
-
margin: 2px;
|
84 |
-
border-radius: 5px;
|
85 |
-
display: flex;
|
86 |
-
align-items: center;
|
87 |
-
justify-content: flex-start;
|
88 |
-
gap: 10px;
|
89 |
-
padding: 0.75rem 1rem;
|
90 |
-
width: 100%;
|
91 |
-
text-align: left;
|
92 |
-
border: none;
|
93 |
-
color: #fff;
|
94 |
-
font-size: 1rem;
|
95 |
-
cursor: pointer;
|
96 |
-
}
|
97 |
-
|
98 |
-
#menu button:hover {
|
99 |
-
background-color: rgba(55, 65, 81, 0.7);
|
100 |
-
}
|
101 |
-
|
102 |
-
/* Responsive Design */
|
103 |
-
@media (max-width: 640px) {
|
104 |
-
.w-72 {
|
105 |
-
width: 95%;
|
106 |
-
}
|
107 |
-
.h-72 {
|
108 |
-
height: 350px;
|
109 |
-
}
|
110 |
-
}
|
111 |
-
/* Main Container */
|
112 |
-
body {
|
113 |
-
background: linear-gradient(135deg, #2c3e50, #1f2937);
|
114 |
-
display: flex;
|
115 |
-
align-items: center;
|
116 |
-
justify-content: center;
|
117 |
-
min-height: 100vh;
|
118 |
-
font-family:
|
119 |
-
}
|
120 |
-
|
121 |
-
/* Main Content Wrapper */
|
122 |
-
.main-content {
|
123 |
-
border: 5px solid rgba(255, 255, 255, 0.2);
|
124 |
-
padding: 2rem;
|
125 |
-
border-radius: 1rem;
|
126 |
-
width: 90%;
|
127 |
-
max-width: 500px;
|
128 |
-
background-color: rgba(0, 0, 0, 0.3);
|
129 |
-
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
|
130 |
-
text-align: center;
|
131 |
-
}
|
132 |
-
|
133 |
-
/* Title */
|
134 |
-
.main-title {
|
135 |
-
font-size: 2.5rem;
|
136 |
-
font-weight: bold;
|
137 |
-
margin-bottom: 1.5rem;
|
138 |
-
color: #fff;
|
139 |
-
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
|
140 |
-
}
|
141 |
-
|
142 |
-
/* Hamburger Menu Button */
|
143 |
-
#menuButton {
|
144 |
-
background-color: rgba(255, 255, 255, 0.1);
|
145 |
-
border: none;
|
146 |
-
border-radius: 50%;
|
147 |
-
padding: 0.5rem;
|
148 |
-
cursor: pointer;
|
149 |
-
transition: background-color 0.2s ease;
|
150 |
-
}
|
151 |
-
|
152 |
-
#menuButton:hover {
|
153 |
-
background-color: rgba(255, 255, 255, 0.2);
|
154 |
-
}
|
155 |
-
</style>
|
156 |
-
</head>
|
157 |
-
<body onclick="closeMenu(event)">
|
158 |
-
<!-- Main Content Wrapper -->
|
159 |
-
<div class="main-content relative">
|
160 |
-
<!-- Title -->
|
161 |
-
<div class="main-title">JustTalk</div>
|
162 |
-
|
163 |
-
<!-- Hamburger Menu -->
|
164 |
-
<div class="absolute top-4 left-4">
|
165 |
-
<button
|
166 |
-
id="menuButton"
|
167 |
-
class="text-white text-2xl focus:outline-none"
|
168 |
-
onclick="toggleMenu(event)"
|
169 |
-
>
|
170 |
-
<i class="fas fa-bars"></i>
|
171 |
-
</button>
|
172 |
-
|
173 |
-
<!-- Menu Content -->
|
174 |
-
<div
|
175 |
-
id="menu"
|
176 |
-
class="absolute top-0 left-0 h-full w-64 bg-gray-800 text-white transform -translate-x-full transition-transform duration-300 ease-in-out opacity-0 visibility-hidden"
|
177 |
-
>
|
178 |
-
<div class="px-4 py-2 text-lg font-semibold">メニュー</div>
|
179 |
-
<button onclick="showUserRegister()">
|
180 |
-
<i class="fas fa-user-plus"></i> メンバーを追加
|
181 |
-
</button>
|
182 |
-
<button onclick="
|
183 |
-
<i class="fas fa-
|
184 |
-
</button>
|
185 |
-
<button onclick="
|
186 |
-
<i class="fas fa-
|
187 |
-
</button>
|
188 |
-
<button onclick="
|
189 |
-
<i class="fas fa-
|
190 |
-
</button>
|
191 |
-
<button onclick="
|
192 |
-
<i class="fas fa-
|
193 |
-
</button>
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html lang="ja">
|
3 |
+
<head>
|
4 |
+
<meta charset="UTF-8" />
|
5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
6 |
+
<title>JustTalk - Voice Analysis</title>
|
7 |
+
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
8 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
9 |
+
<link
|
10 |
+
rel="stylesheet"
|
11 |
+
href="https://use.fontawesome.com/releases/v5.10.0/css/all.css"
|
12 |
+
/>
|
13 |
+
<style>
|
14 |
+
/* Custom Chart.js Styles */
|
15 |
+
#speechChart {
|
16 |
+
background-color: rgba(255, 255, 255, 0.05);
|
17 |
+
border-radius: 10px;
|
18 |
+
padding: 10px;
|
19 |
+
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
|
20 |
+
}
|
21 |
+
|
22 |
+
/* Record Button Styles */
|
23 |
+
.record-button {
|
24 |
+
width: 90px;
|
25 |
+
height: 90px;
|
26 |
+
background-color: transparent;
|
27 |
+
border-radius: 50%;
|
28 |
+
border: 5px solid white;
|
29 |
+
display: flex;
|
30 |
+
justify-content: center;
|
31 |
+
align-items: center;
|
32 |
+
cursor: pointer;
|
33 |
+
box-shadow: 0 6px 10px rgba(0, 0, 0, 0.5);
|
34 |
+
transition: all 0.2s ease;
|
35 |
+
}
|
36 |
+
|
37 |
+
.record-icon {
|
38 |
+
width: 70px;
|
39 |
+
height: 70px;
|
40 |
+
background-color: #e53e3e;
|
41 |
+
border-radius: 50%;
|
42 |
+
transition: all 0.2s ease;
|
43 |
+
}
|
44 |
+
|
45 |
+
.recording .record-icon {
|
46 |
+
width: 50px;
|
47 |
+
height: 50px;
|
48 |
+
border-radius: 15%;
|
49 |
+
background-color: #c53030;
|
50 |
+
}
|
51 |
+
|
52 |
+
.icon i {
|
53 |
+
font-size: 24px;
|
54 |
+
}
|
55 |
+
|
56 |
+
/* Hamburger Menu Styles */
|
57 |
+
#menu {
|
58 |
+
position: absolute;
|
59 |
+
top: 0;
|
60 |
+
left: 0;
|
61 |
+
z-index: 10;
|
62 |
+
transform: translateX(-100%);
|
63 |
+
visibility: hidden;
|
64 |
+
opacity: 0;
|
65 |
+
background-color: rgb(31, 41, 55);
|
66 |
+
transition: transform 0.3s ease-in-out, visibility 0s 0.3s,
|
67 |
+
opacity 0.3s ease-in-out;
|
68 |
+
backdrop-filter: blur(10px);
|
69 |
+
border-right: 1px solid rgba(255, 255, 255, 0.2);
|
70 |
+
}
|
71 |
+
|
72 |
+
#menu.open {
|
73 |
+
transform: translateX(0);
|
74 |
+
visibility: visible;
|
75 |
+
opacity: 1;
|
76 |
+
transition: transform 0.3s ease-in-out, visibility 0s 0s,
|
77 |
+
opacity 0.3s ease-in-out;
|
78 |
+
}
|
79 |
+
|
80 |
+
#menu button {
|
81 |
+
transition: background-color 0.2s ease;
|
82 |
+
background-color: rgba(0, 0, 0, 0.1); /* 変更点: 透明度を 10% に変更 */
|
83 |
+
margin: 2px;
|
84 |
+
border-radius: 5px;
|
85 |
+
display: flex;
|
86 |
+
align-items: center;
|
87 |
+
justify-content: flex-start;
|
88 |
+
gap: 10px;
|
89 |
+
padding: 0.75rem 1rem;
|
90 |
+
width: 100%;
|
91 |
+
text-align: left;
|
92 |
+
border: none;
|
93 |
+
color: #fff;
|
94 |
+
font-size: 1rem;
|
95 |
+
cursor: pointer;
|
96 |
+
}
|
97 |
+
|
98 |
+
#menu button:hover {
|
99 |
+
background-color: rgba(55, 65, 81, 0.7);
|
100 |
+
}
|
101 |
+
|
102 |
+
/* Responsive Design */
|
103 |
+
@media (max-width: 640px) {
|
104 |
+
.w-72 {
|
105 |
+
width: 95%;
|
106 |
+
}
|
107 |
+
.h-72 {
|
108 |
+
height: 350px;
|
109 |
+
}
|
110 |
+
}
|
111 |
+
/* Main Container */
|
112 |
+
body {
|
113 |
+
background: linear-gradient(135deg, #2c3e50, #1f2937);
|
114 |
+
display: flex;
|
115 |
+
align-items: center;
|
116 |
+
justify-content: center;
|
117 |
+
min-height: 100vh;
|
118 |
+
font-family: "Arial", sans-serif;
|
119 |
+
}
|
120 |
+
|
121 |
+
/* Main Content Wrapper */
|
122 |
+
.main-content {
|
123 |
+
border: 5px solid rgba(255, 255, 255, 0.2);
|
124 |
+
padding: 2rem;
|
125 |
+
border-radius: 1rem;
|
126 |
+
width: 90%;
|
127 |
+
max-width: 500px;
|
128 |
+
background-color: rgba(0, 0, 0, 0.3);
|
129 |
+
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
|
130 |
+
text-align: center;
|
131 |
+
}
|
132 |
+
|
133 |
+
/* Title */
|
134 |
+
.main-title {
|
135 |
+
font-size: 2.5rem;
|
136 |
+
font-weight: bold;
|
137 |
+
margin-bottom: 1.5rem;
|
138 |
+
color: #fff;
|
139 |
+
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
|
140 |
+
}
|
141 |
+
|
142 |
+
/* Hamburger Menu Button */
|
143 |
+
#menuButton {
|
144 |
+
background-color: rgba(255, 255, 255, 0.1);
|
145 |
+
border: none;
|
146 |
+
border-radius: 50%;
|
147 |
+
padding: 0.5rem;
|
148 |
+
cursor: pointer;
|
149 |
+
transition: background-color 0.2s ease;
|
150 |
+
}
|
151 |
+
|
152 |
+
#menuButton:hover {
|
153 |
+
background-color: rgba(255, 255, 255, 0.2);
|
154 |
+
}
|
155 |
+
</style>
|
156 |
+
</head>
|
157 |
+
<body onclick="closeMenu(event)">
|
158 |
+
<!-- Main Content Wrapper -->
|
159 |
+
<div class="main-content relative">
|
160 |
+
<!-- Title -->
|
161 |
+
<div class="main-title">JustTalk</div>
|
162 |
+
|
163 |
+
<!-- Hamburger Menu -->
|
164 |
+
<div class="absolute top-4 left-4">
|
165 |
+
<button
|
166 |
+
id="menuButton"
|
167 |
+
class="text-white text-2xl focus:outline-none"
|
168 |
+
onclick="toggleMenu(event)"
|
169 |
+
>
|
170 |
+
<i class="fas fa-bars"></i>
|
171 |
+
</button>
|
172 |
+
|
173 |
+
<!-- Menu Content -->
|
174 |
+
<div
|
175 |
+
id="menu"
|
176 |
+
class="absolute top-0 left-0 h-full w-64 bg-gray-800 text-white transform -translate-x-full transition-transform duration-300 ease-in-out opacity-0 visibility-hidden"
|
177 |
+
>
|
178 |
+
<div class="px-4 py-2 text-lg font-semibold">メニュー</div>
|
179 |
+
<button onclick="showUserRegister()">
|
180 |
+
<i class="fas fa-user-plus"></i> メンバーを追加
|
181 |
+
</button>
|
182 |
+
<button onclick="showRecorder()">
|
183 |
+
<i class="fas fa-microphone"></i> 録音画面を表示
|
184 |
+
</button>
|
185 |
+
<button onclick="showResults()">
|
186 |
+
<i class="fas fa-chart-bar"></i> フィードバックを表示
|
187 |
+
</button>
|
188 |
+
<button onclick="showTalkDetail()">
|
189 |
+
<i class="fas fa-comments"></i> 会話詳細を表示
|
190 |
+
</button>
|
191 |
+
<button onclick="resetAction()">
|
192 |
+
<i class="fas fa-redo"></i> リセット
|
193 |
+
</button>
|
194 |
+
<button onclick="toggleMenu(event)">
|
195 |
+
<i class="fas fa-times"></i> 閉じる
|
196 |
+
</button>
|
197 |
+
</div>
|
198 |
+
</div>
|
199 |
+
|
200 |
+
<!-- Chart Display -->
|
201 |
+
<div class="chart w-72 h-72 mb-5 mx-auto">
|
202 |
+
<canvas id="speechChart"></canvas>
|
203 |
+
</div>
|
204 |
+
|
205 |
+
<!-- Record Form -->
|
206 |
+
<form
|
207 |
+
id="recordForm"
|
208 |
+
action="/submit"
|
209 |
+
method="POST"
|
210 |
+
class="flex items-center justify-center space-x-2 w-full sm:w-auto"
|
211 |
+
onsubmit="event.preventDefault();"
|
212 |
+
>
|
213 |
+
<!-- Record Button -->
|
214 |
+
<button
|
215 |
+
type="button"
|
216 |
+
class="record-button"
|
217 |
+
id="recordButton"
|
218 |
+
onclick="toggleRecording()"
|
219 |
+
>
|
220 |
+
<div class="record-icon" id="recordIcon"></div>
|
221 |
+
</button>
|
222 |
+
</form>
|
223 |
+
</div>
|
224 |
+
|
225 |
+
<script src="{{ url_for('static', filename='process.js') }}"></script>
|
226 |
+
<script src="{{ url_for('static', filename='menu.js') }}"></script>
|
227 |
+
</body>
|
228 |
+
</html>
|