Update views.js
Browse files
views.js
CHANGED
|
@@ -1,78 +1,77 @@
|
|
| 1 |
module.exports = {
|
| 2 |
-
|
|
|
|
| 3 |
<html><head>
|
| 4 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 5 |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
|
| 6 |
<style>
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
|
|
|
| 10 |
.logo { font-weight: 800; font-size: 20px; color: #fff; text-decoration: none; }
|
| 11 |
.logo span { color: var(--primary); }
|
| 12 |
-
.main { padding:
|
| 13 |
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
|
| 14 |
-
@media (min-width: 768px) { .grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap:
|
| 15 |
-
.card { background: var(--card); border-radius:
|
| 16 |
-
.card
|
| 17 |
-
.card
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
.
|
|
|
|
|
|
|
|
|
|
| 22 |
.bottom-nav { position: fixed; bottom: 0; left: 0; width: 100%; background: #080808; border-top: 1px solid #1a1a1a; display: flex; justify-content: space-around; padding: 15px 0; z-index: 9999; }
|
| 23 |
-
.nav-item { color: #475569; text-decoration: none; display: flex; flex-direction: column; align-items: center; gap:
|
| 24 |
.nav-item.active { color: var(--primary); }
|
| 25 |
</style>
|
| 26 |
-
<script>
|
| 27 |
-
function switchMirror(url, el) {
|
| 28 |
-
document.getElementById('player-frame').src = url;
|
| 29 |
-
document.querySelectorAll('.mirror-btn').forEach(b => b.classList.remove('active'));
|
| 30 |
-
el.classList.add('active');
|
| 31 |
-
}
|
| 32 |
-
</script>
|
| 33 |
</head><body>
|
| 34 |
-
<header>
|
|
|
|
|
|
|
|
|
|
| 35 |
<div class="main">${content}</div>
|
| 36 |
<div class="bottom-nav">
|
| 37 |
-
<a href="/" class="nav-item
|
| 38 |
-
<a href="/
|
| 39 |
</div>
|
| 40 |
</body></html>`,
|
| 41 |
|
| 42 |
-
|
|
|
|
| 43 |
<html><head>
|
| 44 |
<style>
|
| 45 |
body { background: #000; color: #fff; font-family: monospace; padding: 25px; }
|
| 46 |
-
.card { background: #0a0a0a; border: 1px solid #
|
| 47 |
-
input { width: 100%; padding: 15px; background: #000; border: 1px solid #
|
| 48 |
-
button { background: #3b82f6; color: #fff; border: none; padding: 15px; border-radius: 10px; width: 100%; font-weight:
|
| 49 |
-
.
|
| 50 |
</style>
|
| 51 |
<script>
|
| 52 |
-
|
| 53 |
-
async function start() {
|
| 54 |
const url = document.getElementById('url').value;
|
| 55 |
fetch('/api/scrape?url=' + encodeURIComponent(url));
|
|
|
|
| 56 |
setInterval(async () => {
|
| 57 |
const r = await fetch('/api/live-status');
|
| 58 |
const d = await r.json();
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
document.getElementById('live').scrollTop = document.getElementById('live').scrollHeight;
|
| 65 |
-
}
|
| 66 |
-
}, 1500);
|
| 67 |
}
|
| 68 |
</script>
|
| 69 |
</head><body>
|
| 70 |
-
<h2>
|
| 71 |
<div class="card">
|
| 72 |
-
<p>
|
| 73 |
-
<input type="text" id="url" value="https://anichin.cafe" placeholder="
|
| 74 |
-
<button onclick="
|
| 75 |
</div>
|
| 76 |
-
<div class="
|
| 77 |
</body></html>`
|
| 78 |
};
|
|
|
|
| 1 |
module.exports = {
|
| 2 |
+
// 1. TAMPILAN PUBLIK (TANPA AKSES PANEL)
|
| 3 |
+
layout: (content, query = '', page = 1, totalPages = 1) => `
|
| 4 |
<html><head>
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
|
| 7 |
<style>
|
| 8 |
+
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;600;800&display=swap');
|
| 9 |
+
:root { --primary: #3b82f6; --bg: #030303; --card: #0d0d0d; --text: #f1f5f9; }
|
| 10 |
+
body { background: var(--bg); color: var(--text); font-family: 'Plus Jakarta Sans', sans-serif; margin: 0; padding-bottom: 80px; }
|
| 11 |
+
header { background: rgba(3,3,3,0.8); backdrop-filter: blur(20px); padding: 18px 25px; border-bottom: 1px solid #1a1a1a; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 1000; }
|
| 12 |
.logo { font-weight: 800; font-size: 20px; color: #fff; text-decoration: none; }
|
| 13 |
.logo span { color: var(--primary); }
|
| 14 |
+
.main { padding: 20px; max-width: 1200px; margin: 0 auto; }
|
| 15 |
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
|
| 16 |
+
@media (min-width: 768px) { .grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 25px; } }
|
| 17 |
+
.card { background: var(--card); border-radius: 18px; overflow: hidden; border: 1px solid #1a1a1a; cursor: pointer; transition: 0.4s; position: relative; }
|
| 18 |
+
.card:hover { transform: translateY(-10px); border-color: var(--primary); }
|
| 19 |
+
.card img { width: 100%; height: 280px; object-fit: cover; }
|
| 20 |
+
.card-title { padding: 12px; font-size: 11px; font-weight: 700; text-align: center; }
|
| 21 |
+
|
| 22 |
+
/* Pagination Elit */
|
| 23 |
+
.pagination { display: flex; justify-content: center; gap: 8px; margin: 40px 0; }
|
| 24 |
+
.p-btn { background: #111; border: 1px solid #222; color: #555; padding: 10px 18px; border-radius: 12px; text-decoration: none; font-size: 12px; font-weight: 800; }
|
| 25 |
+
.p-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
|
| 26 |
+
|
| 27 |
.bottom-nav { position: fixed; bottom: 0; left: 0; width: 100%; background: #080808; border-top: 1px solid #1a1a1a; display: flex; justify-content: space-around; padding: 15px 0; z-index: 9999; }
|
| 28 |
+
.nav-item { color: #475569; text-decoration: none; display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 10px; font-weight: 800; }
|
| 29 |
.nav-item.active { color: var(--primary); }
|
| 30 |
</style>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
</head><body>
|
| 32 |
+
<header>
|
| 33 |
+
<a href="/" class="logo">AQSO <span>OMEGA</span></a>
|
| 34 |
+
<form action="/" style="margin:0;"><input type="text" name="q" value="${query}" placeholder="Cari donghua..." style="background:#111; border:1px solid #222; color:#fff; padding:8px 15px; border-radius:20px; font-size:11px; outline:none;"></form>
|
| 35 |
+
</header>
|
| 36 |
<div class="main">${content}</div>
|
| 37 |
<div class="bottom-nav">
|
| 38 |
+
<a href="/" class="nav-item active"><i class="fas fa-play-circle"></i>STREAM</a>
|
| 39 |
+
<a href="/?page=1" class="nav-item"><i class="fas fa-th-large"></i>INDEX</a>
|
| 40 |
</div>
|
| 41 |
</body></html>`,
|
| 42 |
|
| 43 |
+
// 2. PANEL ADMIN (AKSES TERPISAH/RAHASIA)
|
| 44 |
+
adminLayout: (stats, logs) => `
|
| 45 |
<html><head>
|
| 46 |
<style>
|
| 47 |
body { background: #000; color: #fff; font-family: monospace; padding: 25px; }
|
| 48 |
+
.card { background: #0a0a0a; border: 1px solid #111; padding: 25px; border-radius: 15px; margin-bottom: 25px; }
|
| 49 |
+
input { width: 100%; padding: 15px; background: #000; border: 1px solid #222; color: #10b981; border-radius: 10px; margin-bottom: 15px; }
|
| 50 |
+
button { background: #3b82f6; color: #fff; border: none; padding: 15px; border-radius: 10px; cursor: pointer; width: 100%; font-weight: 800; }
|
| 51 |
+
.log-box { background: #050505; border: 1px solid #111; padding: 15px; border-radius: 10px; font-family: monospace; font-size: 11px; height: 350px; overflow-y: auto; color: #10b981; }
|
| 52 |
</style>
|
| 53 |
<script>
|
| 54 |
+
function startSync() {
|
|
|
|
| 55 |
const url = document.getElementById('url').value;
|
| 56 |
fetch('/api/scrape?url=' + encodeURIComponent(url));
|
| 57 |
+
alert('DEEP SCRAPE MULAI! Pantau terminal.');
|
| 58 |
setInterval(async () => {
|
| 59 |
const r = await fetch('/api/live-status');
|
| 60 |
const d = await r.json();
|
| 61 |
+
const l = document.createElement('div');
|
| 62 |
+
l.innerHTML = '<b>[' + new Date().toLocaleTimeString() + ']</b> ' + d.lastAction;
|
| 63 |
+
document.getElementById('live').appendChild(l);
|
| 64 |
+
document.getElementById('live').scrollTop = document.getElementById('live').scrollHeight;
|
| 65 |
+
}, 3000);
|
|
|
|
|
|
|
|
|
|
| 66 |
}
|
| 67 |
</script>
|
| 68 |
</head><body>
|
| 69 |
+
<h2>COMMAND CENTER v55.0 [RAHASIA]</h2>
|
| 70 |
<div class="card">
|
| 71 |
+
<p>DATABASE: ${stats.total} TITLES</p>
|
| 72 |
+
<input type="text" id="url" value="https://anichin.cafe" placeholder="Link Anichin">
|
| 73 |
+
<button onclick="startSync()">EXECUTE ATOMIC SYNC</button>
|
| 74 |
</div>
|
| 75 |
+
<div class="log-box" id="live">> STANDBY...</div>
|
| 76 |
</body></html>`
|
| 77 |
};
|