Aqso commited on
Commit
53ed886
·
verified ·
1 Parent(s): 2363307

Update views.js

Browse files
Files changed (1) hide show
  1. views.js +43 -44
views.js CHANGED
@@ -1,78 +1,77 @@
1
  module.exports = {
2
- layout: (content, query = '', isView = false) => `
 
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
- :root { --primary: #3b82f6; --bg: #030303; --card: #0d0d0d; --text: #f8fafc; }
8
- body { background: var(--bg); color: var(--text); font-family: 'Inter', sans-serif; margin: 0; padding-bottom: 90px; }
9
- header { background: rgba(0,0,0,0.85); backdrop-filter: blur(20px); padding: 15px 20px; border-bottom: 1px solid #1a1a1a; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 1000; }
 
10
  .logo { font-weight: 800; font-size: 20px; color: #fff; text-decoration: none; }
11
  .logo span { color: var(--primary); }
12
- .main { padding: 15px; max-width: 1200px; margin: 0 auto; }
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: 20px; } }
15
- .card { background: var(--card); border-radius: 12px; overflow: hidden; border: 1px solid #1a1a1a; cursor: pointer; transition: 0.3s; position: relative; }
16
- .card img { width: 100%; height: 260px; object-fit: cover; }
17
- .card-title { padding: 12px; font-size: 11px; font-weight: 700; text-align: center; height: 40px; overflow: hidden; }
18
- /* Mirror Buttons Style */
19
- .mirror-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 15px; }
20
- .mirror-btn { background: #111; border: 1px solid #222; color: #94a3b8; padding: 10px 15px; border-radius: 8px; font-size: 11px; font-weight: 800; cursor: pointer; text-decoration: none; }
21
- .mirror-btn:hover, .mirror-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
 
 
 
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: 4px; font-size: 9px; font-weight: 800; }
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><a href="/" class="logo">AQSO <span>OMEGA</span></a></header>
 
 
 
35
  <div class="main">${content}</div>
36
  <div class="bottom-nav">
37
- <a href="/" class="nav-item ${!isView ? 'active' : ''}"><i class="fas fa-home"></i>HOME</a>
38
- <a href="/admin" class="nav-item"><i class="fas fa-tools"></i>ADMIN</a>
39
  </div>
40
  </body></html>`,
41
 
42
- adminLayout: (stats) => `
 
43
  <html><head>
44
  <style>
45
  body { background: #000; color: #fff; font-family: monospace; padding: 25px; }
46
- .card { background: #0a0a0a; border: 1px solid #222; padding: 25px; border-radius: 15px; margin-bottom: 20px; }
47
- input { width: 100%; padding: 15px; background: #000; border: 1px solid #333; color: #10b981; border-radius: 10px; margin-bottom: 15px; outline: none; }
48
- button { background: #3b82f6; color: #fff; border: none; padding: 15px; border-radius: 10px; width: 100%; font-weight: 900; cursor: pointer; }
49
- .terminal { background: #050505; border: 1px solid #10b981; border-radius: 12px; padding: 20px; height: 350px; overflow-y: auto; color: #10b981; font-size: 11px; }
50
  </style>
51
  <script>
52
- let lastMsg = '';
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
- if(d.lastAction !== lastMsg) {
60
- lastMsg = d.lastAction;
61
- const l = document.createElement('div');
62
- l.innerHTML = '<b>[' + new Date().toLocaleTimeString() + ']</b> ' + lastMsg;
63
- document.getElementById('live').appendChild(l);
64
- document.getElementById('live').scrollTop = document.getElementById('live').scrollHeight;
65
- }
66
- }, 1500);
67
  }
68
  </script>
69
  </head><body>
70
- <h2>INFINITE_MIRROR_PANEL_v52.0</h2>
71
  <div class="card">
72
- <p>DATABASE_STORE: ${stats.total} TITLES</p>
73
- <input type="text" id="url" value="https://anichin.cafe" placeholder="LINK TARGET">
74
- <button onclick="start()">EXECUTE_MULTI_MIRROR_SYNC</button>
75
  </div>
76
- <div class="terminal" id="live">> STANDBY FOR DEEP EXTRACTION...</div>
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
  };