Spaces:
Running
Running
Update index.html
Browse files- index.html +39 -19
index.html
CHANGED
|
@@ -1,19 +1,39 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
</
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="ar" dir="rtl">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>أخبار الألعاب الحصرية</title>
|
| 7 |
+
<style>
|
| 8 |
+
body { font-family: sans-serif; background: #1a1a1a; color: white; padding: 20px; line-height: 1.6; }
|
| 9 |
+
.container { max-width: 800px; margin: auto; background: #2d2d2d; padding: 20px; border-radius: 10px; }
|
| 10 |
+
img, iframe { max-width: 100%; border-radius: 8px; }
|
| 11 |
+
.btn { display: inline-block; background: #ff4c4c; color: white; padding: 15px 25px; text-decoration: none; border-radius: 5px; font-weight: bold; margin-top: 20px; }
|
| 12 |
+
</style>
|
| 13 |
+
</head>
|
| 14 |
+
<body>
|
| 15 |
+
<div class="container">
|
| 16 |
+
<h1 id="title">جاري تحميل أحدث الأخبار...</h1>
|
| 17 |
+
<div id="video"></div>
|
| 18 |
+
<div id="content"></div>
|
| 19 |
+
<center><a id="link" href="#" class="btn">اضغط هنا لتحميل اللعبة / الكود</a></center>
|
| 20 |
+
</div>
|
| 21 |
+
|
| 22 |
+
<script>
|
| 23 |
+
const params = new URLSearchParams(window.location.search);
|
| 24 |
+
const id = params.get('id') || 0;
|
| 25 |
+
|
| 26 |
+
fetch('data.json')
|
| 27 |
+
.then(res => res.json())
|
| 28 |
+
.then(data => {
|
| 29 |
+
const item = data.find(i => i.id == id) || data[0];
|
| 30 |
+
document.getElementById('title').innerText = item.title;
|
| 31 |
+
document.getElementById('content').innerHTML = item.content;
|
| 32 |
+
document.getElementById('video').innerHTML = item.video;
|
| 33 |
+
document.getElementById('link').href = item.smart_link;
|
| 34 |
+
}).catch(() => {
|
| 35 |
+
document.getElementById('title').innerText = "مرحباً بك في موقع الألعاب";
|
| 36 |
+
});
|
| 37 |
+
</script>
|
| 38 |
+
</body>
|
| 39 |
+
</html>
|