llamameta commited on
Commit
e9cbf89
·
verified ·
1 Parent(s): 5dc1f55

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +122 -19
index.html CHANGED
@@ -1,19 +1,122 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ <!DOCTYPE html>
3
+ <html lang="id">
4
+ <head>
5
+ <meta charset="utf-8" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
7
+ <title>Game</title>
8
+ <style>
9
+ :root { color-scheme: dark; }
10
+ * { box-sizing: border-box; }
11
+ html, body {
12
+ margin: 0;
13
+ padding: 0;
14
+ height: 100%;
15
+ width: 100%;
16
+ overflow: hidden;
17
+ background: #0b0d12;
18
+ font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
19
+ }
20
+ #frame {
21
+ position: fixed;
22
+ inset: 0;
23
+ width: 100%;
24
+ height: 100%;
25
+ border: 0;
26
+ display: block;
27
+ }
28
+ #loader {
29
+ position: fixed;
30
+ inset: 0;
31
+ display: flex;
32
+ flex-direction: column;
33
+ align-items: center;
34
+ justify-content: center;
35
+ gap: 14px;
36
+ background: #0b0d12;
37
+ color: #cbd3e1;
38
+ font-size: 14px;
39
+ letter-spacing: .02em;
40
+ transition: opacity .35s ease;
41
+ z-index: 2;
42
+ }
43
+ #loader.hidden { opacity: 0; pointer-events: none; }
44
+ .spinner {
45
+ width: 34px;
46
+ height: 34px;
47
+ border: 3px solid rgba(255,255,255,.14);
48
+ border-top-color: #6ea8fe;
49
+ border-radius: 50%;
50
+ animation: spin .8s linear infinite;
51
+ }
52
+ @keyframes spin { to { transform: rotate(360deg); } }
53
+ #fallback {
54
+ position: fixed;
55
+ inset: 0;
56
+ display: none;
57
+ flex-direction: column;
58
+ align-items: center;
59
+ justify-content: center;
60
+ gap: 16px;
61
+ padding: 24px;
62
+ text-align: center;
63
+ background: #0b0d12;
64
+ color: #cbd3e1;
65
+ z-index: 3;
66
+ }
67
+ #fallback a {
68
+ display: inline-block;
69
+ padding: 12px 22px;
70
+ border-radius: 10px;
71
+ background: #6ea8fe;
72
+ color: #0b0d12;
73
+ font-weight: 600;
74
+ text-decoration: none;
75
+ }
76
+ </style>
77
+ </head>
78
+ <body>
79
+
80
+ <iframe
81
+ id="frame"
82
+ src="https://misty-river-e346.hji180248.workers.dev/?brand=glm53"
83
+ title="Game"
84
+ allow="accelerometer; autoplay; clipboard-write; encrypted-media; fullscreen; gamepad; gyroscope; microphone; xr-spatial-tracking"
85
+ allowfullscreen
86
+ referrerpolicy="no-referrer"
87
+ ></iframe>
88
+
89
+ <div id="loader">
90
+ <div class="spinner"></div>
91
+ <div>Memuat game…</div>
92
+ </div>
93
+
94
+ <div id="fallback">
95
+ <div>Game tidak bisa dimuat di dalam halaman ini.</div>
96
+ <a href="https://misty-river-e346.hji180248.workers.dev/?brand=glm53" target="_blank" rel="noopener">Buka di tab baru</a>
97
+ </div>
98
+
99
+ <script>
100
+ var frame = document.getElementById('frame');
101
+ var loader = document.getElementById('loader');
102
+ var fallback = document.getElementById('fallback');
103
+ var loaded = false;
104
+
105
+ frame.addEventListener('load', function () {
106
+ loaded = true;
107
+ loader.classList.add('hidden');
108
+ });
109
+
110
+ // Kalau setelah 15 detik iframe tetap tidak load, tampilkan tombol buka di tab baru.
111
+ //https://huggingface.co/zai-org/GLM-5.3
112
+ //demo = gr.load(name="Qwen/Qwen3.8-2.4T-A95B", src=transformers_gradio.registry)
113
+ setTimeout(function () {
114
+ if (!loaded) {
115
+ loader.classList.add('hidden');
116
+ fallback.style.display = 'flex';
117
+ }
118
+ }, 15000);
119
+ </script>
120
+
121
+ </body>
122
+ </html>