rein0421 commited on
Commit
f024ed2
·
verified ·
1 Parent(s): 27d15cb

Upload index.html

Browse files
Files changed (1) hide show
  1. templates/index.html +156 -80
templates/index.html CHANGED
@@ -3,26 +3,162 @@
3
  <head>
4
  <meta charset="UTF-8" />
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
- <title>Voice Recorder Interface</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
  </head>
14
- <body
15
- class="flex items-center justify-center h-screen bg-gray-900 text-white"
16
- onclick="closeMenu(event)"
17
- >
18
- <!-- 全体を囲む枠 -->
19
- <div
20
- class="border-4 border-gray-400 p-8 rounded-lg w-full sm:w-auto relative"
21
- >
22
- <!-- タイトル -->
23
- <div class="text-center text-4xl font-bold mb-5">JustTalk</div>
24
-
25
- <!-- ハンバーガーメニュー -->
26
  <div class="absolute top-4 right-4">
27
  <button
28
  id="menuButton"
@@ -32,7 +168,7 @@
32
  <i class="fas fa-bars"></i>
33
  </button>
34
 
35
- <!-- メニューの本体 -->
36
  <div
37
  id="menu"
38
  class="absolute top-0 right-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"
@@ -71,12 +207,12 @@
71
  </div>
72
  </div>
73
 
74
- <!-- チャート表示部 -->
75
- <div class="chart w-72 h-72 mb-5">
76
  <canvas id="speechChart"></canvas>
77
  </div>
78
 
79
- <!-- 録音フォーム -->
80
  <form
81
  id="recordForm"
82
  action="/submit"
@@ -84,7 +220,7 @@
84
  class="flex items-center justify-center space-x-2 w-full sm:w-auto"
85
  onsubmit="event.preventDefault();"
86
  >
87
- <!-- 録音ボタン -->
88
  <button
89
  type="button"
90
  class="record-button"
@@ -96,66 +232,6 @@
96
  </form>
97
  </div>
98
 
99
- <style>
100
- .record-button {
101
- width: 80px;
102
- height: 80px;
103
- background-color: transparent;
104
- border-radius: 50%;
105
- border: 4px solid white;
106
- display: flex;
107
- justify-content: center;
108
- align-items: center;
109
- cursor: pointer;
110
- box-shadow: 0 4px 6px rgba(0, 0, 0, 0.4);
111
- transition: all 0.2s ease;
112
- }
113
- .record-icon {
114
- width: 60px;
115
- height: 60px;
116
- background-color: #d32f2f;
117
- border-radius: 50%;
118
- transition: all 0.2s ease;
119
- }
120
- .recording .record-icon {
121
- width: 40px;
122
- height: 40px;
123
- border-radius: 10%;
124
- }
125
- .icon i {
126
- font-size: 20px;
127
- }
128
- /* ハンバーガーメニュー */
129
- #menu {
130
- position: absolute;
131
- top: 0;
132
- right: 0;
133
- z-index: 10;
134
- transform: translateX(100%); /* 初期状態で画面外 */
135
- visibility: hidden; /* 非表示 */
136
- opacity: 0; /* 非表示 */
137
- background-color: rgba(31, 41, 55, 1); /* 不透明な背景色 */
138
- transition: transform 0.3s ease-in-out, visibility 0s 0.3s,
139
- opacity 0.3s ease-in-out; /* スライド後に表示 */
140
- }
141
- #menu.open {
142
- transform: translateX(0); /* メニューが開く */
143
- visibility: visible; /* 表示 */
144
- opacity: 1; /* 完全に表示 */
145
- transition: transform 0.3s ease-in-out, visibility 0s 0s,
146
- opacity 0.3s ease-in-out; /* すぐに表示 */
147
- }
148
- /* レスポンシブデザイン */
149
- @media (max-width: 640px) {
150
- .w-72 {
151
- width: 90%;
152
- }
153
- .h-72 {
154
- height: 300px;
155
- }
156
- }
157
- </style>
158
- <script src="{{ url_for('static', filename='process.js') }}"></script>
159
-
160
  </body>
161
- </html>
 
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); /* Subtle background for the chart */
17
+ border-radius: 10px;
18
+ padding: 10px;
19
+ box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Soft shadow */
20
+ }
21
+
22
+ /* Record Button Styles */
23
+ .record-button {
24
+ width: 90px; /* Slightly larger */
25
+ height: 90px; /* Slightly larger */
26
+ background-color: transparent;
27
+ border-radius: 50%;
28
+ border: 5px solid white; /* Thicker border */
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); /* Deeper shadow */
34
+ transition: all 0.2s ease;
35
+ }
36
+
37
+ .record-icon {
38
+ width: 70px; /* Slightly larger */
39
+ height: 70px; /* Slightly larger */
40
+ background-color: #e53e3e; /* Brighter red */
41
+ border-radius: 50%;
42
+ transition: all 0.2s ease;
43
+ }
44
+
45
+ .recording .record-icon {
46
+ width: 50px; /* Slightly larger */
47
+ height: 50px; /* Slightly larger */
48
+ border-radius: 15%; /* More rounded square */
49
+ background-color: #c53030; /* Darker red when recording */
50
+ }
51
+
52
+ .icon i {
53
+ font-size: 24px; /* Larger icon */
54
+ }
55
+
56
+ /* Hamburger Menu Styles */
57
+ #menu {
58
+ position: absolute;
59
+ top: 0;
60
+ right: 0;
61
+ z-index: 10;
62
+ transform: translateX(100%);
63
+ visibility: hidden;
64
+ opacity: 0;
65
+ background-color: rgba(31, 41, 55, 0.95); /* Slightly transparent */
66
+ transition: transform 0.3s ease-in-out, visibility 0s 0.3s,
67
+ opacity 0.3s ease-in-out;
68
+ backdrop-filter: blur(10px); /* Add a blur effect */
69
+ }
70
+
71
+ #menu.open {
72
+ transform: translateX(0);
73
+ visibility: visible;
74
+ opacity: 1;
75
+ transition: transform 0.3s ease-in-out, visibility 0s 0s,
76
+ opacity 0.3s ease-in-out;
77
+ }
78
+
79
+ #menu button {
80
+ transition: background-color 0.2s ease;
81
+ }
82
+
83
+ #menu button:hover {
84
+ background-color: rgba(55, 65, 81, 0.7); /* Darker on hover */
85
+ }
86
+
87
+ /* Responsive Design */
88
+ @media (max-width: 640px) {
89
+ .w-72 {
90
+ width: 95%; /* Take up more space on small screens */
91
+ }
92
+ .h-72 {
93
+ height: 350px; /* Taller on small screens */
94
+ }
95
+ }
96
+ /* Main Container */
97
+ body {
98
+ background: linear-gradient(135deg, #2c3e50, #1f2937); /* Gradient background */
99
+ display: flex;
100
+ align-items: center;
101
+ justify-content: center;
102
+ min-height: 100vh; /* Ensure full viewport height */
103
+ font-family: 'Arial', sans-serif; /* Modern font */
104
+ }
105
+
106
+ /* Main Content Wrapper */
107
+ .main-content {
108
+ border: 5px solid rgba(255, 255, 255, 0.2); /* Subtle border */
109
+ padding: 2rem;
110
+ border-radius: 1rem;
111
+ width: 90%; /* Responsive width */
112
+ max-width: 500px; /* Maximum width */
113
+ background-color: rgba(0, 0, 0, 0.3); /* Semi-transparent background */
114
+ box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4); /* Stronger shadow */
115
+ text-align: center;
116
+ }
117
+
118
+ /* Title */
119
+ .main-title {
120
+ font-size: 2.5rem;
121
+ font-weight: bold;
122
+ margin-bottom: 1.5rem;
123
+ color: #fff;
124
+ text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5); /* Text shadow */
125
+ }
126
+
127
+ /* Hamburger Menu Button */
128
+ #menuButton {
129
+ background-color: rgba(255, 255, 255, 0.1); /* Light background */
130
+ border: none;
131
+ border-radius: 50%;
132
+ padding: 0.5rem;
133
+ cursor: pointer;
134
+ transition: background-color 0.2s ease;
135
+ }
136
+
137
+ #menuButton:hover {
138
+ background-color: rgba(255, 255, 255, 0.2); /* Darker on hover */
139
+ }
140
+
141
+ /* Menu Items */
142
+ #menu button {
143
+ display: block;
144
+ width: 100%;
145
+ padding: 0.75rem 1rem;
146
+ text-align: left;
147
+ border: none;
148
+ background-color: transparent;
149
+ color: #fff;
150
+ font-size: 1rem;
151
+ cursor: pointer;
152
+ }
153
+ </style>
154
  </head>
155
+ <body onclick="closeMenu(event)">
156
+ <!-- Main Content Wrapper -->
157
+ <div class="main-content relative">
158
+ <!-- Title -->
159
+ <div class="main-title">JustTalk</div>
160
+
161
+ <!-- Hamburger Menu -->
 
 
 
 
 
162
  <div class="absolute top-4 right-4">
163
  <button
164
  id="menuButton"
 
168
  <i class="fas fa-bars"></i>
169
  </button>
170
 
171
+ <!-- Menu Content -->
172
  <div
173
  id="menu"
174
  class="absolute top-0 right-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"
 
207
  </div>
208
  </div>
209
 
210
+ <!-- Chart Display -->
211
+ <div class="chart w-72 h-72 mb-5 mx-auto">
212
  <canvas id="speechChart"></canvas>
213
  </div>
214
 
215
+ <!-- Record Form -->
216
  <form
217
  id="recordForm"
218
  action="/submit"
 
220
  class="flex items-center justify-center space-x-2 w-full sm:w-auto"
221
  onsubmit="event.preventDefault();"
222
  >
223
+ <!-- Record Button -->
224
  <button
225
  type="button"
226
  class="record-button"
 
232
  </form>
233
  </div>
234
 
235
+ <script src="{{ url_for('static', filename='process.js') }}"></script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
236
  </body>
237
+ </html>