Spaces:
Runtime error
Runtime error
Upload userRegister.html
Browse files- templates/userRegister.html +90 -186
templates/userRegister.html
CHANGED
|
@@ -1,186 +1,90 @@
|
|
| 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 |
-
<
|
| 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 |
-
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>
|
|
|
|
| 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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|