-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
67 lines (65 loc) · 14.7 KB
/
index.html
File metadata and controls
67 lines (65 loc) · 14.7 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
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>摛藻 v1</title>
<meta name="generator" content="VuePress 1.9.10">
<meta name="description" content="一个基于 JavaScript 开发的文学类项目">
<link rel="preload" href="/assets/css/0.styles.3e8f9a53.css" as="style"><link rel="preload" href="/assets/js/app.5a6cb56a.js" as="script"><link rel="preload" href="/assets/js/2.d816a04d.js" as="script"><link rel="preload" href="/assets/js/1.8e0865b0.js" as="script"><link rel="preload" href="/assets/js/22.bff645f3.js" as="script"><link rel="prefetch" href="/assets/js/10.3a52698d.js"><link rel="prefetch" href="/assets/js/11.5a32c356.js"><link rel="prefetch" href="/assets/js/12.d1fac6f7.js"><link rel="prefetch" href="/assets/js/13.e37456fe.js"><link rel="prefetch" href="/assets/js/14.5eb02e97.js"><link rel="prefetch" href="/assets/js/15.f4a73f35.js"><link rel="prefetch" href="/assets/js/16.0da34392.js"><link rel="prefetch" href="/assets/js/17.4ae81fed.js"><link rel="prefetch" href="/assets/js/18.1198418d.js"><link rel="prefetch" href="/assets/js/19.9efc8374.js"><link rel="prefetch" href="/assets/js/20.5d622c1c.js"><link rel="prefetch" href="/assets/js/21.8daff977.js"><link rel="prefetch" href="/assets/js/23.a302b1b0.js"><link rel="prefetch" href="/assets/js/24.d1100c43.js"><link rel="prefetch" href="/assets/js/3.a5bdcc19.js"><link rel="prefetch" href="/assets/js/4.88a56df4.js"><link rel="prefetch" href="/assets/js/5.d749a763.js"><link rel="prefetch" href="/assets/js/6.698f0bc7.js"><link rel="prefetch" href="/assets/js/7.94a4c24e.js"><link rel="prefetch" href="/assets/js/vendors~docsearch.ef62c33d.js">
<link rel="stylesheet" href="/assets/css/0.styles.3e8f9a53.css">
</head>
<body>
<div id="app" data-server-rendered="true"><div class="theme-container no-sidebar"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/" aria-current="page" class="home-link router-link-exact-active router-link-active"><img src="/images/logo.png" alt="摛藻 v1" class="logo"> <span class="site-name can-hide">摛藻 v1</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/" aria-current="page" class="nav-link router-link-exact-active router-link-active">
首页
</a></div><div class="nav-item"><a href="/guide/" class="nav-link">
指南
</a></div><div class="nav-item"><a href="/ecosystem/" class="nav-link">
生态
</a></div><div class="nav-item"><a href="https://github.com/ChizaoProject" target="_blank" rel="noopener noreferrer" class="nav-link external">
Github
<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></div><div class="nav-item"><a href="https://cdn.jsdelivr.net/gh/ChizaoProject/chizaobook@latest/" target="_blank" rel="noopener noreferrer" class="nav-link external">
jsDelivr
<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="/" aria-current="page" class="nav-link router-link-exact-active router-link-active">
首页
</a></div><div class="nav-item"><a href="/guide/" class="nav-link">
指南
</a></div><div class="nav-item"><a href="/ecosystem/" class="nav-link">
生态
</a></div><div class="nav-item"><a href="https://github.com/ChizaoProject" target="_blank" rel="noopener noreferrer" class="nav-link external">
Github
<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></div><div class="nav-item"><a href="https://cdn.jsdelivr.net/gh/ChizaoProject/chizaobook@latest/" target="_blank" rel="noopener noreferrer" class="nav-link external">
jsDelivr
<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a></div> <!----></nav> <ul class="sidebar-links"><li><section class="sidebar-group depth-0"><p class="sidebar-heading open"><span>Home</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/#快速开始" class="sidebar-link">快速开始</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/#安装" class="sidebar-link">安装</a></li><li class="sidebar-sub-header"><a href="/#使用" class="sidebar-link">使用</a></li><li class="sidebar-sub-header"><a href="/#异步加载" class="sidebar-link">异步加载</a></li></ul></li></ul></section></li></ul> </aside> <main aria-labelledby="main-title" class="home"><header class="hero"><img src="/images/avatar.png" alt="hero"> <h1 id="main-title">
摛藻
</h1> <p class="description">
一个基于 JavaScript 开发的文学类项目
</p> <p class="action"><a href="/guide/" class="nav-link action-button">
在线文档
</a></p></header> <div class="features"><div class="feature"><h2>原生 JavaScript</h2> <p>远离臃肿,追求简洁,基于原生JS开发。</p></div><div class="feature"><h2>开放源代码</h2> <p>依托于快速发展的开源社区不断壮大。</p></div><div class="feature"><h2>模块化</h2> <p>高度集成的模块化编程设计,提高运行效率的同时也减少了代码量。</p></div></div> <div class="theme-default-content custom content__default"><div class="custom-block warning"><p class="custom-block-title">WARNING</p> <p>网站正在建设中,部分栏目的内容可能存在遗漏、误区,这些缺失内容会在接下来的日子里逐步完善,敬请谅解。</p></div> <h2 id="快速开始"><a href="#快速开始" class="header-anchor">#</a> 快速开始</h2> <h3 id="安装"><a href="#安装" class="header-anchor">#</a> 安装</h3> <ul><li><p>通过 jsDelivr 安装</p> <p><img src="https://data.jsdelivr.com/v1/package/gh/ChizaoProject/chizaobook/badge" alt=""></p></li></ul> <div class="language-html extra-class"><pre class="language-html"><code><span class="token tag"><span class="token tag"><span class="token punctuation"><</span>script</span> <span class="token attr-name">src</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>https://cdn.jsdelivr.net/gh/ChizaoProject/chizaobook@latest/app.js<span class="token punctuation">"</span></span> <span class="token attr-name">async</span><span class="token punctuation">></span></span><span class="token script"></span><span class="token tag"><span class="token tag"><span class="token punctuation"></</span>script</span><span class="token punctuation">></span></span>
</code></pre></div><h3 id="使用"><a href="#使用" class="header-anchor">#</a> 使用</h3> <p>在页面添加一个容器:</p> <div class="language-html extra-class"><pre class="language-html"><code><span class="token tag"><span class="token tag"><span class="token punctuation"><</span>chizaobook</span><span class="token punctuation">></span></span>
</code></pre></div><p>之后使用以下JavaScript代码来生成插件:</p> <div class="language-javascript extra-class"><pre class="language-javascript"><code><span class="token keyword">const</span> chizaobook <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">Chizaobook</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
<span class="token literal-property property">container</span><span class="token operator">:</span> <span class="token string">"chizaobook"</span><span class="token punctuation">,</span> <span class="token comment">// string</span>
<span class="token literal-property property">packageSource</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span> <span class="token comment">// string</span>
<span class="token literal-property property">packageType</span><span class="token operator">:</span> <span class="token number">8</span> <span class="token comment">// int</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre></div><h3 id="异步加载"><a href="#异步加载" class="header-anchor">#</a> 异步加载</h3> <p>jsDelivr CDN有时较慢,可以采用以下方法进行异步加载,防止阻塞页面正常加载。</p> <div class="language-html extra-class"><pre class="language-html"><code><span class="token tag"><span class="token tag"><span class="token punctuation"><</span>script</span><span class="token punctuation">></span></span><span class="token script"><span class="token language-javascript">
<span class="token keyword">let</span> app <span class="token operator">=</span> document<span class="token punctuation">.</span><span class="token function">createElement</span><span class="token punctuation">(</span><span class="token string">'script'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
app<span class="token punctuation">.</span>src <span class="token operator">=</span> <span class="token string">'https://cdn.jsdelivr.net/gh/ChizaoProject/chizaobook@master/app.js'</span><span class="token punctuation">;</span>
app<span class="token punctuation">.</span>async <span class="token operator">=</span> <span class="token boolean">true</span><span class="token punctuation">;</span>
app<span class="token punctuation">.</span><span class="token function-variable function">onload</span> <span class="token operator">=</span> <span class="token keyword">function</span> <span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
chizaobook <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">Chizaobook</span><span class="token punctuation">(</span><span class="token punctuation">{</span>
<span class="token literal-property property">container</span><span class="token operator">:</span> <span class="token string">"chizaobook"</span><span class="token punctuation">,</span> <span class="token comment">// string</span>
<span class="token literal-property property">packageSource</span><span class="token operator">:</span> <span class="token string">"https://cdn.jsdelivr.net/gh/ChizaoProject/Packages@master/package_source.json"</span><span class="token punctuation">,</span> <span class="token comment">// string</span>
<span class="token literal-property property">packageType</span><span class="token operator">:</span> <span class="token keyword">null</span> <span class="token comment">// int</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span>
chizaobook<span class="token punctuation">.</span><span class="token function">selector</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span><span class="token punctuation">;</span>
document<span class="token punctuation">.</span>head<span class="token punctuation">.</span><span class="token function">appendChild</span><span class="token punctuation">(</span>app<span class="token punctuation">)</span><span class="token punctuation">;</span>
</span></span><span class="token tag"><span class="token tag"><span class="token punctuation"></</span>script</span><span class="token punctuation">></span></span>
</code></pre></div><div class="custom-block tip"><p class="custom-block-title">TIP</p> <h4 id="packagesource"><a href="#packagesource" class="header-anchor">#</a> packageSource</h4> <p>该参数的参数值可以为“数据包”链接,也可以为“数据源”(数据包索引)链接。</p> <p>我们推荐将该项设置为 <code>"https://cdn.jsdelivr.net/gh/ChizaoProject/Packages@latest/package_source.json"</code>(留空默认为该值)</p> <p>当然您也可以根据自己的喜好,制作自己的数据包索引(参考文档),或是使用社区制作的第三方数据包索引。</p></div></div> <div class="footer">
Copyright © 2022-2025 fly6022 | GPL-3.0 Licensed | Powered by VuePress.
</div></main></div><div class="global-ui"></div></div>
<script src="/assets/js/app.5a6cb56a.js" defer></script><script src="/assets/js/2.d816a04d.js" defer></script><script src="/assets/js/1.8e0865b0.js" defer></script><script src="/assets/js/22.bff645f3.js" defer></script>
</body>
</html>