mizzzuno commited on
Commit
5a7432d
·
verified ·
1 Parent(s): 1bdcba6

Update templates/userRegister.html

Browse files
Files changed (1) hide show
  1. templates/userRegister.html +186 -90
templates/userRegister.html CHANGED
@@ -1,90 +1,186 @@
1
- <!DOCTYPE html>
2
- <html lang="ja">
3
- <head>
4
- <meta charset="UTF-8" />
5
- <title>ユーザー音声登録</title>
6
- <script src="https://cdn.tailwindcss.com"></script>
7
- <style>
8
- @keyframes pulse-scale {
9
- 0%,
10
- 100% {
11
- transform: scale(1);
12
- }
13
- 50% {
14
- transform: scale(1.1);
15
- }
16
- }
17
- .animate-pulse-scale {
18
- animation: pulse-scale 1s infinite;
19
- }
20
- .record-button {
21
- width: 50px;
22
- height: 50px;
23
- background-color: transparent;
24
- border-radius: 50%;
25
- border: 2px solid white;
26
- display: flex;
27
- justify-content: center;
28
- align-items: center;
29
- cursor: pointer;
30
- box-shadow: 0 4px 6px rgba(0, 0, 0, 0.4);
31
- transition: all 0.3s ease;
32
- }
33
- .record-icon {
34
- width: 35px;
35
- height: 35px;
36
- background-color: #d32f2f;
37
- border-radius: 50%;
38
- transition: all 0.3s ease;
39
- }
40
- .record-button.recording .record-icon {
41
- border-radius: 4px; /* 録音時に赤い部分だけ四角にする */
42
- }
43
- .recording .record-icon {
44
- width: 20px;
45
- height: 20px;
46
- border-radius: 50%;
47
- }
48
- @media (max-width: 640px) {
49
- .container {
50
- padding: 2rem;
51
- }
52
- }
53
- </style>
54
- </head>
55
- <body
56
- class="bg-gray-800 text-gray-100 dark:bg-gray-900 dark:text-gray-300 transition-colors"
57
- >
58
- <div class="container mx-auto p-5 max-w-full sm:max-w-2xl">
59
- <div id="people-list" class="space-y-4"></div>
60
- <button
61
- id="add-btn"
62
- class="mt-6 px-6 py-2 bg-green-500 text-white rounded-lg hover:bg-green-600 transition-colors"
63
- >
64
- メンバーを追加
65
- </button>
66
-
67
- <!-- 録音画面に戻るボタン -->
68
- <button
69
- id="backButton"
70
- onclick="showRecorder()"
71
- class="mt-6 px-6 py-2 bg-blue-500 text-white rounded-lg hover:bg-blue-600 transition-colors"
72
- >
73
- 録音画面に戻る
74
- </button>
75
- </div>
76
-
77
- <script src="{{ url_for('static', filename='register_record.js') }}"></script>
78
- <script>
79
- function showRecorder() {
80
- // 録音画面へ遷移
81
- window.location.href = "index";
82
- }
83
- </script>
84
- <script>
85
-
86
-
87
-
88
- </script>
89
- </body>
90
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="ja">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <title>ユーザー音声登録</title>
6
+ <script src="https://cdn.tailwindcss.com"></script>
7
+ <script src="https://use.fontawesome.com/releases/v5.10.0/js/all.js"></script>
8
+ <style>
9
+ @keyframes pulse-scale {
10
+ 0%,
11
+ 100% {
12
+ transform: scale(1);
13
+ }
14
+ 50% {
15
+ transform: scale(1.1);
16
+ }
17
+ }
18
+ .animate-pulse-scale {
19
+ animation: pulse-scale 1s infinite;
20
+ }
21
+
22
+ /* Record Button Styles */
23
+ .record-button {
24
+ width: 50px;
25
+ height: 50px;
26
+ background-color: transparent;
27
+ border-radius: 50%;
28
+ border: 2px solid white;
29
+ display: flex;
30
+ justify-content: center;
31
+ align-items: center;
32
+ cursor: pointer;
33
+ box-shadow: 0 4px 6px rgba(0, 0, 0, 0.4);
34
+ transition: all 0.3s ease;
35
+ }
36
+ .record-icon {
37
+ width: 35px;
38
+ height: 35px;
39
+ background-color: #d32f2f;
40
+ border-radius: 50%;
41
+ transition: all 0.3s ease;
42
+ }
43
+ .record-button.recording .record-icon {
44
+ background-color: #f44336; /* 録音中は赤色 */
45
+ border-radius: 4px; /* 録音時に赤い部分だけ四角にする */
46
+ }
47
+ .recording .record-icon {
48
+ width: 20px;
49
+ height: 20px;
50
+ border-radius: 50%;
51
+ }
52
+
53
+ /* Main Container */
54
+ body {
55
+ background: linear-gradient(135deg, #2c3e50, #1f2937);
56
+ display: flex;
57
+ align-items: center;
58
+ justify-content: center;
59
+ min-height: 100vh;
60
+ font-family: "Arial", sans-serif;
61
+ }
62
+
63
+ /* Main Content Wrapper */
64
+ .main-content {
65
+ border: 5px solid rgba(255, 255, 255, 0.2);
66
+ padding: 2rem;
67
+ border-radius: 1rem;
68
+ width: 90%;
69
+ max-width: 500px;
70
+ background-color: rgba(0, 0, 0, 0.3);
71
+ box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
72
+ text-align: center;
73
+ }
74
+
75
+ /* Title */
76
+ .main-title {
77
+ font-size: 2.5rem;
78
+ font-weight: bold;
79
+ margin-bottom: 1.5rem;
80
+ color: #fff;
81
+ text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
82
+ }
83
+
84
+ /* Buttons */
85
+ .action-button {
86
+ margin-top: 1rem;
87
+ padding: 0.75rem 1.5rem;
88
+ border-radius: 0.5rem;
89
+ cursor: pointer;
90
+ transition: background-color 0.2s ease;
91
+ width: 100%;
92
+ }
93
+
94
+ .action-button:hover {
95
+ background-color: rgba(55, 65, 81, 0.7);
96
+ }
97
+
98
+ .back-button {
99
+ background-color: #607d8b; /* 落ち着いたグレー */
100
+ color: white;
101
+ }
102
+
103
+ .add-button {
104
+ background-color: #4caf50; /* 落ち着いた緑色 */
105
+ color: white;
106
+ }
107
+
108
+ /* Disabled State */
109
+ .disabled {
110
+ opacity: 0.5;
111
+ pointer-events: none;
112
+ }
113
+
114
+ /* Responsive Design */
115
+ @media (max-width: 640px) {
116
+ .main-content {
117
+ padding: 1.5rem;
118
+ }
119
+ }
120
+ </style>
121
+ </head>
122
+ <body>
123
+ <!-- Main Content Wrapper -->
124
+ <div class="main-content relative">
125
+ <!-- Title -->
126
+ <div class="main-title">ユーザー音声登録</div>
127
+
128
+ <!-- User List -->
129
+ <div id="people-list" class="space-y-4"></div>
130
+
131
+ <!-- Add Button -->
132
+ <button id="add-btn" class="action-button add-button">
133
+ <i class="fas fa-user-plus"></i> メンバーを追加
134
+ </button>
135
+
136
+ <!-- Back Button -->
137
+ <button
138
+ id="backButton"
139
+ onclick="goBack()"
140
+ class="action-button back-button"
141
+ >
142
+ 戻る
143
+ </button>
144
+ </div>
145
+
146
+ <script src="{{ url_for('static', filename='register_record.js') }}"></script>
147
+ <script>
148
+ // 前の画面に戻る
149
+ function goBack() {
150
+ window.history.back();
151
+ }
152
+
153
+ // Add user function
154
+ function addUser() {
155
+ const userName = prompt("ユーザー名を入力してください");
156
+ if (userName) {
157
+ const userList = document.getElementById("people-list");
158
+ const userDiv = document.createElement("div");
159
+ userDiv.classList.add(
160
+ "bg-gray-700",
161
+ "p-4",
162
+ "rounded-lg",
163
+ "text-white",
164
+ "flex",
165
+ "justify-between",
166
+ "items-center"
167
+ );
168
+ userDiv.innerHTML = `
169
+ <span>${userName}</span>
170
+ <button class="record-button" aria-label="音声録音開始">
171
+ <div class="record-icon"></div>
172
+ </button>
173
+ `;
174
+ userDiv
175
+ .querySelector(".record-button")
176
+ .addEventListener("click", handleRecording);
177
+ userList.appendChild(userDiv);
178
+ }
179
+ }
180
+
181
+ document.getElementById("add-btn").addEventListener("click", addUser);
182
+ </script>
183
+
184
+ <script src="{{ url_for('static', filename='menu.js') }}"></script>
185
+ </body>
186
+ </html>