forked from TurboWarp/extensions
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupload.html
More file actions
153 lines (143 loc) · 8.53 KB
/
upload.html
File metadata and controls
153 lines (143 loc) · 8.53 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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
<!DOCTYPE html>
<html lang="en">
<head>
<title>Upload Your Extension!</title>
<meta charset="utf8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
html {
width: 100%;
}
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
margin: 0;
padding: 0;
}
header {
background-color: #09f;
color: white;
text-align: center;
padding: 20px 0;
}
main {
max-width: 600px;
margin: auto;
}
img {
max-width: 600px;
}
@media (prefers-color-scheme: dark) {
body {
background: #111;
color: #eee;
}
a {
color: #4af;
}
}
.code{
background-color: #0000001f;
border-radius: 5px;
padding: 5px;
padding-left: 10px;
}
</style>
</head>
<body>
<header>
<h1>为AstraEditor提交扩展</h1>
</header>
<main>
<h2>须知</h2>
<p>我们采取 <strong>“Issues”</strong> 的方式让您更方便的提交扩展。
这需要你在提交扩展前有一个 <strong>Github账号</strong> ,对于如何注册,请自行百度,这里不再赘述。</p>
<h2>准备</h2>
<h3>审核</h3>
<p>在您提交一个扩展前,务必确保您的扩展 <strong>可以正确运行</strong> 。我们会对您提交的扩展展开<em>审核</em>,包括但不限于:</p>
<ul>
<li>扩展可以正确加载</li>
<li>所有添加的积木均可正确使用</li>
<li>不包含关于<strong>歧视、污秽语言、网络烂梗</strong>等语言、功能</li>
<li>没有过分的<strong>AI程度</strong>(100%由AI制作)</li>
</ul>
<p>审核的日期不定,但大多都能在<strong>一周内</strong>审核完成,请及时关注结果。</p>
<h3>打包</h3>
<p>您需要保证您提交的文件可以<strong>让别人看懂</strong>。我们规定了一个简单的目录,方便你我更快的检查和加入您的扩展:</p>
<div class="code"><pre class="language-python"><code class="language-python code-highlight"><span class="code-line line-number" line="1">扩展名<span class="token punctuation">.</span><span class="token builtin">zip</span>
</span><span class="code-line line-number" line="2"> <span class="token operator">|</span><span class="token operator">-</span> main<span class="token punctuation">.</span>js <span class="token comment">#您的扩展文件</span>
</span><span class="code-line line-number" line="3"> <span class="token operator">|</span><span class="token operator">-</span> featured<span class="token punctuation">.</span>png <span class="token comment">#扩展的头图,在扩展库显示</span>
</span><span class="code-line line-number" line="4"> <span class="token operator">|</span><span class="token operator">-</span> text<span class="token punctuation">.</span>json <span class="token comment">#存放您的扩展信息</span>
</span></code></pre></div>
<p>如果您提交的<em>不满足</em>我们的要求,我们可能会<strong>拒绝加入</strong>您的扩展。</p>
<p>下面我们会展开每个文件具体的规范。</p>
<h4>main.js</h4>
<p>这里存放您的扩展主文件,具体扩展该如何编写请参考<em>其它扩展教程</em>。</p>
<p>说回来,您的扩展开头应有以下内容:</p>
<div class="code"><pre class="language-js"><code class="language-js code-highlight"><span class="code-line line-number" line="1"><span class="token comment">// Name: 扩展名称</span>
</span><span class="code-line line-number" line="2"><span class="token comment">// ID: 扩展ID</span>
</span><span class="code-line line-number" line="3"><span class="token comment">// Description: 扩展描述</span>
</span><span class="code-line line-number" line="4"><span class="token comment">// By: 作者 <链接></span>
</span><span class="code-line line-number" line="5"><span class="token comment">// By: 更多作者 <链接></span>
</span><span class="code-line line-number" line="6"><span class="token comment">// License: 许可证(MIT、GPLv3等)</span>
</span></code></pre></div>
<p>这<em>在此扩展库</em> <strong>是强制的</strong>,因为它涉及到实际的显示。</p>
<p><strong>我们需要您将Name和Description写为英文,这需要作为默认文本于扩展库显示。</strong></p>
<blockquote>
<strong><p>注意,对于多作者要用多个 <code>// By:</code> 而不是逗号</p></strong>
</blockquote>
<p>此外,我们<em>不要求您的内容包含国际化</em> 。</p>
<h4>featured.png</h4>
<p>这里是扩展的头图,也就是在扩展库展示的图片。
我们<em>硬性</em> 要求扩展图满足以下条件:</p>
<ul>
<li>纵横比为 2:1</li>
<li>分辨率各不小于 600x300</li>
<li>有一个明确的代表,无论文字或图形(你甚至可以只写个扩展名上去)</li>
</ul>
<p>我们也<em>建议</em> 您的扩展图可以:</p>
<ul>
<li>不单调</li>
<li>美观(参考TurboWarp及其他扩展库扩展)</li>
<li>有一个<strong>明确清晰</strong>的主题色而不是<em>炸裂非主流的渐变和AI生成</em></li>
</ul>
<h4>text.json</h4>
<p>您可以复制这个示例并对其修改</p>
<div class="code"> <pre class="language-json"><code class="language-json code-highlight"><span class="code-line line-number" line="1"><span class="token punctuation">{</span>
</span><span class="code-line line-number" line="2"> <span class="token property">"Name"</span><span class="token operator">:</span><span class="token punctuation">{</span>
</span><span class="code-line line-number" line="4"> <span class="token property">"zh-cn"</span><span class="token operator">:</span><span class="token string">"扩展名"</span>
...更多语言
</span><span class="code-line line-number" line="5"> <span class="token punctuation">}</span><span class="token punctuation">,</span>
</span><span class="code-line line-number" line="6"> <span class="token property">"Description"</span><span class="token operator">:</span><span class="token punctuation">{</span>
</span><span class="code-line line-number" line="8"> <span class="token property">"zh-cn"</span><span class="token operator">:</span><span class="token string">"扩展描述"</span>
...更多语言
</span><span class="code-line line-number" line="9"> <span class="token punctuation">}</span><span class="token punctuation">,</span>
}
</code></pre></div>
<p>我们<strong>硬性要求</strong>您的扩展格式包含以上二项,且<code>Name</code>和<code>Description</code>包含<code>zh-cn</code>。这对国际化很有帮助。
</p>
<p>我们<em>不要求您的扩展内容包含国际化</em>。</p>
<h2>准备</h2>
<h3>Issues</h3>
<p>如上,我们使用<strong>Issues</strong>来作为提交介质。我们将展开提交步骤。</p>
<h4>1.进入 Extensions库——Issues</h4>
<p>进入此链接
<a
href="https://github.com/AstraEditor/extensions/issues">https://github.com/AstraEditor/extensions/issues</a>
</p>
<h4>2.发送 Issue</h4>
<p>点击<strong>New issue</strong>。
<img src="./submit/NewIssue.png" alt="New issue">
在<strong>Add a title</strong>下面的<em>输入框</em>输入类似
<code>Add new extension named "扩展名"</code>的文字让我们识别。
<img src="./submit/AddATitle.png" alt="Add a Title">
在<strong>Add a description</strong>处输入您想要告诉我们的信息,这不是必要的。
<img src="./submit/Input.png" alt="Input">
点击下方写着<strong>Paste, drop, or click to add files</strong>的按钮,导入您制作好的扩展文件(.zip)
<img src="./submit/Load.png" alt="Load">
等待导入完成,点击<strong>Create</strong>!
<img src="./submit/Submit.png" alt="Submit">
</p>
<p>完成!现在只需等待我们进行审核并回复您!</p>
</main>
</body>
</html>