Skip to content

Commit 4152bc0

Browse files
committed
chore: fix lint issues and syntax errors reported by trunk
1 parent 3aa0f71 commit 4152bc0

3 files changed

Lines changed: 392 additions & 55 deletions

File tree

lib/index.html

Lines changed: 335 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,335 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<title>Z-Shell / src — CDN Assets</title>
7+
<style>
8+
:root {
9+
--bg: #0d1117;
10+
--surface: #161b22;
11+
--border: #30363d;
12+
--text: #c9d1d9;
13+
--text-muted: #8b949e;
14+
--primary: #58a6ff;
15+
--accent: #bc8cff;
16+
--terminal-header: #21262d;
17+
--font-mono: "Fira Code", "JetBrains Mono", "Consolas", monospace;
18+
--font-sans:
19+
-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial,
20+
sans-serif;
21+
}
22+
23+
* {
24+
box-sizing: border-box;
25+
}
26+
body {
27+
background-color: var(--bg);
28+
color: var(--text);
29+
font-family: var(--font-sans);
30+
margin: 0;
31+
display: flex;
32+
flex-direction: column;
33+
min-height: 100vh;
34+
justify-content: center;
35+
align-items: center;
36+
padding: 20px;
37+
line-height: 1.5;
38+
}
39+
40+
.container {
41+
width: 100%;
42+
max-width: 800px;
43+
}
44+
45+
.header {
46+
text-align: center;
47+
margin-bottom: 40px;
48+
}
49+
50+
.header img {
51+
width: 80px;
52+
height: 80px;
53+
margin-bottom: 16px;
54+
filter: drop-shadow(0 0 10px rgba(88, 166, 255, 0.3));
55+
}
56+
57+
.header h1 {
58+
font-size: 24px;
59+
margin: 0;
60+
letter-spacing: -0.5px;
61+
font-weight: 600;
62+
}
63+
64+
.header p {
65+
color: var(--text-muted);
66+
margin: 8px 0 0;
67+
}
68+
69+
.terminal {
70+
background: var(--surface);
71+
border: 1px solid var(--border);
72+
border-radius: 6px;
73+
overflow: hidden;
74+
box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
75+
}
76+
77+
.terminal-header {
78+
background: var(--terminal-header);
79+
padding: 10px 16px;
80+
display: flex;
81+
align-items: center;
82+
border-bottom: 1px solid var(--border);
83+
}
84+
85+
.dots {
86+
display: flex;
87+
gap: 6px;
88+
}
89+
90+
.dot {
91+
width: 12px;
92+
height: 12px;
93+
border-radius: 50%;
94+
}
95+
96+
.dot-red {
97+
background: #ff5f56;
98+
}
99+
.dot-yellow {
100+
background: #ffbd2e;
101+
}
102+
.dot-green {
103+
background: #27c93f;
104+
}
105+
106+
.terminal-title {
107+
flex-grow: 1;
108+
text-align: center;
109+
font-family: var(--font-mono);
110+
font-size: 13px;
111+
color: var(--text-muted);
112+
margin-right: 42px; /* balance dots */
113+
}
114+
115+
.terminal-content {
116+
padding: 24px;
117+
font-family: var(--font-mono);
118+
font-size: 14px;
119+
}
120+
121+
.prompt {
122+
color: var(--accent);
123+
margin-right: 8px;
124+
}
125+
.command {
126+
color: var(--primary);
127+
}
128+
129+
.asset-list {
130+
margin-top: 24px;
131+
list-style: none;
132+
padding: 0;
133+
}
134+
135+
.asset-item {
136+
display: flex;
137+
justify-content: space-between;
138+
align-items: center;
139+
padding: 12px 16px;
140+
border: 1px solid var(--border);
141+
border-radius: 6px;
142+
margin-bottom: 12px;
143+
background: rgba(48, 54, 61, 0.2);
144+
transition: border-color 0.2s;
145+
}
146+
147+
.asset-item:hover {
148+
border-color: var(--primary);
149+
}
150+
151+
.asset-info {
152+
display: flex;
153+
flex-direction: column;
154+
}
155+
156+
.asset-name {
157+
font-weight: bold;
158+
color: var(--primary);
159+
}
160+
161+
.asset-url {
162+
font-size: 12px;
163+
color: var(--text-muted);
164+
margin-top: 4px;
165+
}
166+
167+
.btn-copy {
168+
background: var(--terminal-header);
169+
border: 1px solid var(--border);
170+
color: var(--text);
171+
padding: 6px 12px;
172+
border-radius: 4px;
173+
cursor: pointer;
174+
font-family: var(--font-mono);
175+
font-size: 12px;
176+
transition: all 0.2s;
177+
}
178+
179+
.btn-copy:hover {
180+
background: var(--primary);
181+
border-color: var(--primary);
182+
color: white;
183+
}
184+
185+
.footer {
186+
margin-top: 40px;
187+
text-align: center;
188+
font-size: 14px;
189+
color: var(--text-muted);
190+
}
191+
192+
.footer a {
193+
color: var(--primary);
194+
text-decoration: none;
195+
margin: 0 10px;
196+
}
197+
198+
.footer a:hover {
199+
text-decoration: underline;
200+
}
201+
202+
@media (max-width: 600px) {
203+
.asset-item {
204+
flex-direction: column;
205+
align-items: flex-start;
206+
}
207+
.btn-copy {
208+
margin-top: 12px;
209+
width: 100%;
210+
text-align: center;
211+
}
212+
}
213+
</style>
214+
</head>
215+
<body>
216+
<div class="container">
217+
<div class="header">
218+
<img
219+
src="https://raw.githubusercontent.com/z-shell/.github/main/profile/img/logo.png"
220+
alt="Z-Shell Logo"
221+
/>
222+
<h1>Z-Shell / src</h1>
223+
<p>High-performance CDN for Z-Shell ecosystem assets.</p>
224+
</div>
225+
226+
<div class="terminal">
227+
<div class="terminal-header">
228+
<div class="dots">
229+
<div class="dot dot-red"></div>
230+
<div class="dot dot-yellow"></div>
231+
<div class="dot dot-green"></div>
232+
</div>
233+
<div class="terminal-title">z-shell@src:~</div>
234+
</div>
235+
<div class="terminal-content">
236+
<div>
237+
<span class="prompt"></span>
238+
<span class="command">ls -1 assets/</span>
239+
</div>
240+
<ul class="asset-list">
241+
<li class="asset-item">
242+
<div class="asset-info">
243+
<span class="asset-name">Zi Loader</span>
244+
<span class="asset-url">src.zshell.dev/zsh/init.zsh</span>
245+
</div>
246+
<button
247+
class="btn-copy"
248+
onclick="copyToClipboard('https://src.zshell.dev/zsh/init.zsh')"
249+
>
250+
COPY URL
251+
</button>
252+
</li>
253+
<li class="asset-item">
254+
<div class="asset-info">
255+
<span class="asset-name">Zi Installer</span>
256+
<span class="asset-url">get.zshell.dev</span>
257+
</div>
258+
<button
259+
class="btn-copy"
260+
onclick="
261+
copyToClipboard(
262+
'sh -c &quot;$(curl -fsSL https://get.zshell.dev)&quot;',
263+
)
264+
"
265+
>
266+
COPY INSTALL CMD
267+
</button>
268+
</li>
269+
<li class="asset-item">
270+
<div class="asset-info">
271+
<span class="asset-name">Zi Wiki</span>
272+
<span class="asset-url">wiki.zshell.dev</span>
273+
</div>
274+
<button
275+
class="btn-copy"
276+
onclick="copyToClipboard('https://wiki.zshell.dev')"
277+
>
278+
VISIT WIKI
279+
</button>
280+
</li>
281+
</ul>
282+
<div style="margin-top: 16px">
283+
<span class="prompt"></span> <span class="blink">_</span>
284+
</div>
285+
</div>
286+
</div>
287+
288+
<div class="footer">
289+
<a href="https://github.com/z-shell/src">GitHub</a>
290+
<a href="https://wiki.zshell.dev">Wiki</a>
291+
<a href="https://github.com/orgs/z-shell/discussions">Discussions</a>
292+
</div>
293+
</div>
294+
295+
<script>
296+
function copyToClipboard(text) {
297+
if (text.startsWith("https://wiki.zshell.dev")) {
298+
window.open(text, "_blank");
299+
return;
300+
}
301+
navigator.clipboard.writeText(text).then(() => {
302+
const btn = event.target;
303+
const originalText = btn.innerText;
304+
btn.innerText = "COPIED!";
305+
btn.style.background = "#238636";
306+
btn.style.borderColor = "#2ea043";
307+
setTimeout(() => {
308+
btn.innerText = originalText;
309+
btn.style.background = "";
310+
btn.style.borderColor = "";
311+
}, 2000);
312+
});
313+
}
314+
</script>
315+
316+
<style>
317+
@keyframes blink {
318+
0% {
319+
opacity: 0;
320+
}
321+
50% {
322+
opacity: 1;
323+
}
324+
100% {
325+
opacity: 0;
326+
}
327+
}
328+
.blink {
329+
animation: blink 1s step-end infinite;
330+
color: var(--primary);
331+
font-weight: bold;
332+
}
333+
</style>
334+
</body>
335+
</html>

0 commit comments

Comments
 (0)