Update index.html
Browse files- index.html +66 -15
index.html
CHANGED
|
@@ -1,23 +1,74 @@
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
<html lang="ar" dir="rtl">
|
| 3 |
<head>
|
| 4 |
-
<meta charset="utf-8"/>
|
| 5 |
-
<title
|
| 6 |
-
<style>
|
| 7 |
-
body {
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
|
|
|
|
|
|
| 13 |
}
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
</head>
|
| 19 |
<body>
|
| 20 |
-
|
| 21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
</body>
|
| 23 |
</html>
|
|
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
<html lang="ar" dir="rtl">
|
| 3 |
<head>
|
| 4 |
+
<meta charset="utf-8"/>
|
| 5 |
+
<title>اختر الصفحة</title>
|
| 6 |
+
<style>
|
| 7 |
+
body { font-family: Arial, sans-serif; margin: 20px; }
|
| 8 |
+
h1 { margin-bottom: 10px; }
|
| 9 |
+
ul { line-height: 1.9; }
|
| 10 |
+
a { color:#0b6efd; text-decoration:none; }
|
| 11 |
+
a:hover { text-decoration:underline; }
|
| 12 |
+
.btn {
|
| 13 |
+
padding: 8px 12px; background: #28a745; color: #fff; border: 0;
|
| 14 |
+
border-radius: 6px; cursor: pointer; margin-bottom: 12px;
|
| 15 |
}
|
| 16 |
+
.mini { font-size: 12px; color:#666; margin-right:8px; }
|
| 17 |
+
</style>
|
| 18 |
+
|
| 19 |
+
<script src="https://cdn.jsdelivr.net/npm/xlsx@0.18.5/dist/xlsx.full.min.js"></script>
|
| 20 |
</head>
|
| 21 |
<body>
|
| 22 |
+
|
| 23 |
+
<h1>اختر الصفحة</h1>
|
| 24 |
+
|
| 25 |
+
<button class="btn" onclick="exportAllToExcel()">تحميل قائمة الروابط (Excel)</button>
|
| 26 |
+
<span class="mini">تصميم وإعداد نوف الناصر</span>
|
| 27 |
+
|
| 28 |
+
<ul id="pages-list"></ul>
|
| 29 |
+
|
| 30 |
+
<script>
|
| 31 |
+
const FOLDER = 'asaar';
|
| 32 |
+
const TOTAL_PAGES = 20;
|
| 33 |
+
|
| 34 |
+
function pageUrl(n) {
|
| 35 |
+
const two = String(n).padStart(2, '0');
|
| 36 |
+
const base = location.origin + location.pathname.replace(/[^/]*$/, '');
|
| 37 |
+
return `${base}${FOLDER}/${two}.html`;
|
| 38 |
+
}
|
| 39 |
+
|
| 40 |
+
// إنشاء القائمة على الصفحة
|
| 41 |
+
(function buildList() {
|
| 42 |
+
const ul = document.getElementById('pages-list');
|
| 43 |
+
for (let i = 1; i <= TOTAL_PAGES; i++) {
|
| 44 |
+
const li = document.createElement('li');
|
| 45 |
+
const a = document.createElement('a');
|
| 46 |
+
a.href = `${FOLDER}/${String(i).padStart(2,'0')}.html`;
|
| 47 |
+
a.target = '_blank';
|
| 48 |
+
a.textContent = `صفحة ${i}`;
|
| 49 |
+
li.appendChild(a);
|
| 50 |
+
ul.appendChild(li);
|
| 51 |
+
}
|
| 52 |
+
})();
|
| 53 |
+
|
| 54 |
+
// تصدير للإكسل بحيث كلمة "اضغط هنا" هي الرابط
|
| 55 |
+
function exportAllToExcel() {
|
| 56 |
+
const rows = [];
|
| 57 |
+
for (let i = 1; i <= TOTAL_PAGES; i++) {
|
| 58 |
+
const link = pageUrl(i);
|
| 59 |
+
rows.push({
|
| 60 |
+
'الصفحة': `صفحة ${i}`,
|
| 61 |
+
'الرابط': { t: "s", v: "اضغط هنا", l: { Target: link } }
|
| 62 |
+
});
|
| 63 |
+
}
|
| 64 |
+
|
| 65 |
+
const ws = XLSX.utils.json_to_sheet([]);
|
| 66 |
+
XLSX.utils.sheet_add_json(ws, rows, { origin: "A1", skipHeader: false });
|
| 67 |
+
|
| 68 |
+
const wb = XLSX.utils.book_new();
|
| 69 |
+
XLSX.utils.book_append_sheet(wb, ws, 'links');
|
| 70 |
+
XLSX.writeFile(wb, 'روابط_الصفحات.xlsx');
|
| 71 |
+
}
|
| 72 |
+
</script>
|
| 73 |
</body>
|
| 74 |
</html>
|