-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpreview.html
More file actions
93 lines (93 loc) · 3.05 KB
/
preview.html
File metadata and controls
93 lines (93 loc) · 3.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<!DOCTYPE html>
<html data-theme="gruvbox">
<head>
<meta charset="utf-8">
<title>Pulpkit Preview: zenith</title>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body { background: #1a1a2e; font-family: system-ui; color: #ccc; }
.desktop {
width: 100vw; height: 100vh;
display: flex; flex-direction: column;
background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}
.bar-frame {
width: 100%; height: 40px;
border-bottom: 1px solid rgba(255,255,255,0.05);
}
.bar-frame iframe { width: 100%; height: 100%; border: none; }
.content-area {
flex: 1; display: flex; align-items: center; justify-content: center;
gap: 24px; padding: 24px;
}
.popup-frame {
width: 380px; height: 500px;
border: 1px solid rgba(255,255,255,0.1);
box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.popup-frame iframe { width: 100%; height: 100%; border: none; }
.label {
font-size: 11px; color: rgba(255,255,255,0.3);
text-align: center; padding: 8px;
text-transform: uppercase; letter-spacing: 2px;
}
.controls {
position: fixed; bottom: 16px; right: 16px;
display: flex; gap: 8px;
}
.controls button {
padding: 6px 14px; background: rgba(255,255,255,0.1);
border: 1px solid rgba(255,255,255,0.15); color: #ccc;
font-size: 12px; cursor: pointer;
}
.controls button:hover { background: rgba(255,255,255,0.2); }
.popup-selector {
position: fixed; bottom: 16px; left: 16px;
display: flex; gap: 4px;
}
.popup-selector button {
padding: 4px 10px; background: rgba(255,255,255,0.05);
border: 1px solid rgba(255,255,255,0.1); color: #888;
font-size: 11px; cursor: pointer;
}
.popup-selector button.active { background: rgba(255,255,255,0.15); color: #fff; }
</style>
</head>
<body>
<div class="desktop">
<div class="bar-frame">
<iframe id="bar-iframe" src="bar-preview.html"></iframe>
</div>
<div class="content-area">
<div>
<div class="label">Popup Preview</div>
<div class="popup-frame">
<iframe id="popup-iframe" src="popup-preview.html"></iframe>
</div>
</div>
</div>
</div>
<div class="popup-selector">
<button onclick="switchPopup('settings')" class="active">Settings</button>
<button onclick="switchPopup('wifi')">WiFi</button>
<button onclick="switchPopup('power')">Power</button>
<button onclick="switchPopup('launcher')">Launcher</button>
<button onclick="switchPopup('config')">Config</button>
</div>
<div class="controls">
<button onclick="refresh()">Refresh</button>
</div>
<script>
let currentPopup = 'settings';
function switchPopup(name) {
currentPopup = name;
document.querySelectorAll('.popup-selector button').forEach(b => b.classList.toggle('active', b.textContent.toLowerCase() === name));
document.getElementById('popup-iframe').contentWindow.postMessage({type:'setPopup',popup:name}, '*');
}
function refresh() {
document.getElementById('bar-iframe').src = 'bar-preview.html?' + Date.now();
document.getElementById('popup-iframe').src = 'popup-preview.html?' + Date.now();
}
</script>
</body>
</html>