Spaces:
Running
Running
File size: 13,722 Bytes
0fabf08 | 1 2 3 4 5 6 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 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 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 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 | <!DOCTYPE html>
<html lang="vi">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>OBTSX</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
background-color: #f8f9fa;
}
header {
background-color: #ff4500;
color: white;
padding: 15px;
text-align: center;
}
header nav {
margin-top: 10px;
}
header nav a {
color: white;
margin: 0 15px;
text-decoration: none;
font-weight: bold;
}
main {
padding: 20px;
}
.countdown {
text-align: center;
margin-bottom: 20px;
}
.upload-section, .message-section {
margin: 20px auto;
max-width: 600px;
background: white;
padding: 20px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
border-radius: 10px;
}
.upload-section h2, .message-section h2 {
margin-top: 0;
color: #ff4500;
}
.video-list, .message-list {
margin-top: 30px;
}
.video-item, .message-item {
margin-bottom: 15px;
padding: 10px;
border: 1px solid #ddd;
border-radius: 5px;
background-color: #fff;
}
.loading-screen {
display: flex;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.8);
color: white;
justify-content: center;
align-items: center;
z-index: 1000;
flex-direction: column;
opacity: 1;
animation: fadeout 3s forwards;
}
.loading-screen img {
width: 150px;
margin-bottom: 20px;
}
.loading-screen h1 {
font-size: 24px;
font-weight: bold;
animation: fadeout-text 3s forwards;
}
.loading-message {
display: none;
text-align: center;
color: #888;
font-style: italic;
margin-top: 20px;
}
.news-section {
margin: 20px auto;
max-width: 800px;
background: white;
padding: 20px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
border-radius: 10px;
}
.news-section h2 {
margin-top: 0;
color: #ff4500;
}
.news-item {
margin-bottom: 15px;
padding: 10px;
border: 1px solid #ddd;
border-radius: 5px;
background-color: #fff;
}
.star-rating {
display: flex;
gap: 5px;
align-items: center;
}
.star {
font-size: 20px;
color: #ccc;
cursor: pointer;
}
.star.selected {
color: #ff4500;
}
@keyframes fadeout {
0% {
opacity: 1;
}
100% {
opacity: 0;
display: none;
}
}
@keyframes fadeout-text {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}
.music_playlist{
margin: 20px auto;
max-width: 600px;
background: white;
padding: 20px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
border-radius: 10px;
}
</style>
</head>
<body>
<div class="loading-screen" id="loadingScreen">
<img src="original.png" alt="Logo">
<h1>OBTSX</h1>
<p>wellcome ghest</p>
</div>
<header>
<h1>OBTSX</h1>
<p></p>
<nav>
<a href="#home">Home OBTSX</a>
<a href="VnexpressX/vnexpressX.html">VnexpressX</a>
<a href="b7/b7.html">My setup</a>
</nav>
</header>
<main>
<div class="countdown">
<!-- Đồng hồ đếm ngược nhúng từ iframe -->
<iframe width="350" height="180" src="https://tienichhay.net/ma-nhung.html?action=countdown&n=Lunar%20New%20Year&dl=Ng%C3%A0y&hl=Gi%E1%BB%9D&ml=Ph%C3%BAt&sl=Gi%C3%A2y&date=2025-01-25&eh=0&em=0&style=horizontal&size=2&r=10px&c=ffffff&bg=c82254&t=no&hide=no&al=center&isln=no&rpy=no" title="Đếm ngược" style="width:100%;max-height:100%;" frameborder="0" scrolling="no" allowfullscreen></iframe>
</div>
<div class="music_playlist">
<h1>My best music playlist</h1>
<h3>from sao kirito</h3>
<iframe
id="soundcloud-player"
width="100%"
height="450"
scrolling="no"
frameborder="no"
allow="autoplay"
src="https://w.soundcloud.com/player/?url=https://soundcloud.com/sao-kirito-3/sets/anime&color=%23ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&show_teaser=true">
</iframe>
</div>
<section class="upload-section">
<h2>Upload video</h2>
<form id="uploadForm">
<label for="videoTitle">Tên video:</label><br>
<input type="text" id="videoTitle" name="videoTitle" required style="width: 100%; padding: 10px; margin: 10px 0;"><br>
<label for="videoFile">Chọn tệp video:</label><br>
<input type="file" id="videoFile" name="videoFile" accept="video/*" required style="margin: 10px 0;"><br>
<button type="submit" style="background-color: #ff4500; color: white; padding: 10px 20px; border: none; border-radius: 5px; cursor: pointer;">Upload</button>
</form>
<div class="loading-message" id="videoLoadingMessage">Đang tải...</div>
</section>
<section class="video-list">
<h2>Video community</h2>
<div id="videoContainer">
<!-- Các video sẽ được thêm vào đây -->
</div>
</section>
<section class="message-section">
<h2>Bình luận</h2>
<form id="messageForm">
<label for="messageContent">Nội dung bình luận:</label><br>
<textarea id="messageContent" name="messageContent" required style="width: 100%; padding: 10px; margin: 10px 0; height: 100px;"></textarea><br>
<div class="star-rating">
<span class="star" data-value="1">★</span>
<span class="star" data-value="2">★</span>
<span class="star" data-value="3">★</span>
<span class="star" data-value="4">★</span>
<span class="star" data-value="5">★</span>
</div>
<button type="submit" style="background-color: #ff4500; color: white; padding: 10px 20px; border: none; border-radius: 5px; cursor: pointer;">Bình luận</button>
</form>
<div class="loading-message" id="messageLoadingMessage">Đang tải</div>
<div class="message-list" id="messageContainer">
<!-- Tin nhắn sẽ được thêm vào đây -->
</div>
</section>
</main>
<script>
const uploadForm = document.getElementById('uploadForm');
const videoContainer = document.getElementById('videoContainer');
const messageForm = document.getElementById('messageForm');
const messageContainer = document.getElementById('messageContainer');
const loadingScreen = document.getElementById('loadingScreen');
const videoLoadingMessage = document.getElementById('videoLoadingMessage');
const messageLoadingMessage = document.getElementById('messageLoadingMessage');
const newsContainer = document.getElementById('newsContainer');
const stars = document.querySelectorAll('.star');
let selectedRating = 0;
window.addEventListener('load', () => {
setTimeout(() => {
loadingScreen.style.display = 'none';
}, 5000); // Hiển thị màn hình chờ trong 3 giây
fetchNews();
});
// Xử lý tải lên video
uploadForm.addEventListener('submit', function(event) {
event.preventDefault();
videoLoadingMessage.style.display = 'block';
const videoTitle = document.getElementById('videoTitle').value;
const videoFile = document.getElementById('videoFile').files[0];
if (!videoFile) {
alert('Vui lòng chọn tệp video.');
videoLoadingMessage.style.display = 'none';
return;
}
setTimeout(() => {
const videoItem = document.createElement('div');
videoItem.className = 'video-item';
const videoElement = document.createElement('video');
videoElement.controls = true;
videoElement.src = URL.createObjectURL(videoFile);
videoElement.style.width = '100%';
const titleElement = document.createElement('p');
titleElement.textContent = videoTitle;
const timestampElement = document.createElement('p');
const uploadTime = new Date();
timestampElement.textContent = `Tải lên lúc: ${uploadTime.toLocaleString()}`;
timestampElement.style.fontSize = '12px';
timestampElement.style.color = '#888';
videoItem.appendChild(titleElement);
videoItem.appendChild(videoElement);
videoItem.appendChild(timestampElement);
videoContainer.appendChild(videoItem);
uploadForm.reset();
videoLoadingMessage.style.display = 'none';
}, 2000); // Giả lập thời gian xử lý
});
// Xử lý gửi tin nhắn
messageForm.addEventListener('submit', function(event) {
event.preventDefault();
messageLoadingMessage.style.display = 'block';
const messageContent = document.getElementById('messageContent').value;
setTimeout(() => {
const messageItem = document.createElement('div');
messageItem.className = 'message-item';
const commentText = document.createElement('p');
commentText.textContent = messageContent;
const ratingText = document.createElement('p');
ratingText.textContent = `Đánh giá: ${selectedRating}/5 sao`;
ratingText.style.color = '#888';
ratingText.style.fontSize = '12px';
messageItem.appendChild(commentText);
messageItem.appendChild(ratingText);
messageContainer.appendChild(messageItem);
messageForm.reset();
selectedRating = 0;
stars.forEach(star => star.classList.remove('selected'));
messageLoadingMessage.style.display = 'none';
}, 5000); // Giả lập thời gian xử lý
});
// Xử lý đánh giá sao
stars.forEach(star => {
star.addEventListener('click', () => {
selectedRating = star.getAttribute('data-value');
stars.forEach(s => s.classList.remove('selected'));
for (let i = 0; i < selectedRating; i++) {
stars[i].classList.add('selected');
}
});
});
// Lấy tin tức từ VnExpress
function fetchNews() {
fetch('https://vnexpress.net/rss/tin-moi-nhat.rss')
.then(response => response.text())
.then(data => {
const parser = new DOMParser();
const xml = parser.parseFromString(data, 'text/xml');
const items = xml.querySelectorAll('item');
for (let i = 0; i < 4; i++) {
const item = items[i];
const title = item.querySelector('title').textContent;
const link = item.querySelector('link').textContent;
const newsItem = document.createElement('div');
newsItem.className = 'news-item';
const newsLink = document.createElement('a');
newsLink.href = link;
newsLink.textContent = title;
newsLink.target = '_blank';
newsLink.style.textDecoration = 'none';
newsItem.appendChild(newsLink);
newsContainer.appendChild(newsItem);
}
})
.catch(error => console.error('Lỗi khi lấy tin tức:', error));
}
</script>
</body>
</html> |