-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathd
More file actions
110 lines (89 loc) · 1.68 KB
/
Copy pathd
File metadata and controls
110 lines (89 loc) · 1.68 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>UI Banners Dev</title>
<style>
body {
margin: 0;
font-family: Inter, Arial, sans-serif;
background: #fff;
color: #111;
}
.container {
max-width: 1000px;
margin: auto;
padding: 60px 20px;
}
h1 {
font-size: 40px;
margin-bottom: 10px;
}
p {
color: #666;
}
.box {
background: #f6f6f6;
padding: 14px;
border-radius: 10px;
font-family: monospace;
margin-top: 10px;
}
.grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
gap: 16px;
margin-top: 30px;
}
.card {
border: 1px solid #eee;
border-radius: 12px;
padding: 16px;
}
.card a {
display: inline-block;
margin-top: 10px;
text-decoration: none;
border: 1px solid #ddd;
padding: 6px 10px;
border-radius: 8px;
color: #111;
}
</style>
</head>
<body>
<div class="container">
<h1>UI Banners</h1>
<p>Dev environment for building and testing banner templates</p>
<h3>How to use</h3>
<div class="box">
1. Create folder in /raw<br>
2. Add index.html + style.css + banner.json<br>
3. Run npm run dev<br>
4. Open /preview/your-folder
</div>
<h3>Script usage</h3>
<div class="box">
<script>
window.UI_BANNER = { banner: "your-folder" };
</script>
<script src="http://127.0.0.1:8000/dev/banner.js"></script>
</div>
<h3>Preview</h3>
<div class="grid" id="grid"></div>
</div>
<script>
async function load() {
const res = await fetch("/raw");
const text = await res.text();
document.getElementById("grid").innerHTML = `
<div class="card">
<b>Manual Preview</b><br>
Go to /preview/your-banner
</div>
`;
}
load();
</script>
</body>
</html>