Update index.html
Browse files- index.html +59 -66
index.html
CHANGED
|
@@ -1,71 +1,64 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
e.preventDefault();
|
| 11 |
-
if (searchQuery.trim()) {
|
| 12 |
-
// Формируем URL для поиска на YouTube
|
| 13 |
-
const searchUrl = `https://www.youtube.com/results?search_query=${encodeURIComponent(searchQuery)}`;
|
| 14 |
-
window.open(searchUrl, '_blank');
|
| 15 |
-
}
|
| 16 |
-
};
|
| 17 |
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
<input
|
| 27 |
-
type="text"
|
| 28 |
-
value={searchQuery}
|
| 29 |
-
onChange={(e) => setSearchQuery(e.target.value)}
|
| 30 |
-
placeholder="Что вы хотите найти?"
|
| 31 |
-
className="flex-1 px-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500"
|
| 32 |
-
/>
|
| 33 |
-
<button
|
| 34 |
-
type="submit"
|
| 35 |
-
className="px-6 py-2 bg-red-600 text-white rounded-lg hover:bg-red-700 flex items-center gap-2"
|
| 36 |
-
>
|
| 37 |
-
<Search size={20} />
|
| 38 |
-
Поиск
|
| 39 |
-
</button>
|
| 40 |
-
</form>
|
| 41 |
-
</CardContent>
|
| 42 |
-
</Card>
|
| 43 |
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
className="absolute top-0 left-0 w-full h-full"
|
| 50 |
-
src={`https://www.youtube.com/embed/${selectedVideo}`}
|
| 51 |
-
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
|
| 52 |
-
allowFullScreen
|
| 53 |
-
></iframe>
|
| 54 |
-
</div>
|
| 55 |
-
</CardContent>
|
| 56 |
-
</Card>
|
| 57 |
-
)}
|
| 58 |
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
};
|
| 70 |
|
| 71 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="ru">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>YouTube</title>
|
| 7 |
+
<style>
|
| 8 |
+
* {
|
| 9 |
+
margin: 0;
|
| 10 |
+
padding: 0;
|
| 11 |
+
box-sizing: border-box;
|
| 12 |
+
}
|
| 13 |
|
| 14 |
+
html, body {
|
| 15 |
+
height: 100%;
|
| 16 |
+
width: 100%;
|
| 17 |
+
overflow: hidden;
|
| 18 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
|
| 20 |
+
.youtube-container {
|
| 21 |
+
position: fixed;
|
| 22 |
+
top: 0;
|
| 23 |
+
left: 0;
|
| 24 |
+
width: 100%;
|
| 25 |
+
height: 100%;
|
| 26 |
+
border: none;
|
| 27 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
|
| 29 |
+
.youtube-frame {
|
| 30 |
+
width: 100%;
|
| 31 |
+
height: 100%;
|
| 32 |
+
border: none;
|
| 33 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
|
| 35 |
+
.loading-message {
|
| 36 |
+
position: fixed;
|
| 37 |
+
top: 50%;
|
| 38 |
+
left: 50%;
|
| 39 |
+
transform: translate(-50%, -50%);
|
| 40 |
+
font-family: Arial, sans-serif;
|
| 41 |
+
font-size: 18px;
|
| 42 |
+
color: #333;
|
| 43 |
+
display: none;
|
| 44 |
+
}
|
|
|
|
| 45 |
|
| 46 |
+
.youtube-frame:not(:loaded) + .loading-message {
|
| 47 |
+
display: block;
|
| 48 |
+
}
|
| 49 |
+
</style>
|
| 50 |
+
</head>
|
| 51 |
+
<body>
|
| 52 |
+
<div class="youtube-container">
|
| 53 |
+
<iframe
|
| 54 |
+
class="youtube-frame"
|
| 55 |
+
src="https://www.youtube.com"
|
| 56 |
+
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
|
| 57 |
+
allowfullscreen
|
| 58 |
+
></iframe>
|
| 59 |
+
<div class="loading-message">
|
| 60 |
+
Загрузка YouTube...
|
| 61 |
+
</div>
|
| 62 |
+
</div>
|
| 63 |
+
</body>
|
| 64 |
+
</html>
|