-
Notifications
You must be signed in to change notification settings - Fork 1
/
special-detail.html
345 lines (322 loc) · 15.1 KB
/
special-detail.html
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
<!DOCTYPE html>
<html lang="zxx">
<head>
<!--====== Required meta tags ======-->
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!--====== Title ======-->
<title> 专题 - Serverless Registry - Serverless package management platform </title>
<!--====== Bootstrap css ======-->
<link rel="stylesheet" href="static/css/bootstrap.min.css">
<!--=== Owl-Carousel ===-->
<link rel="stylesheet" href="static/css/owl.carousel.min.css">
<!--====== Magnific ======-->
<link rel="stylesheet" href="static/css/magnific-popup.css">
<!--===nice-select===-->
<link rel="stylesheet" href="static/css/nice-select.css">
<!--====== Animate CSS ======-->
<link rel="stylesheet" href="static/css/animate.min.css">
<!--====== Font Awesome ======-->
<link rel="stylesheet" href="static/css/font-awesome.min.css">
<!--====== Main Css ======-->
<link rel="stylesheet" href="static/css/style.css">
<!--====== Responsive Css ======-->
<link rel="stylesheet" href="static/css/responsive.css">
<style>
.text-flow-ellipsis-multiple {
/* 多余内容省略号处理-多行 */
word-break: break-all;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
overflow: hidden;
}
.text-flow-ellipsis-single {
/* 多余内容省略号处理-单行 */
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.preButton {
width: 120px;
height: 34px;
border: 1px solid rgba(4, 10, 41, 0.12);
border-radius: 3px;
color: #fff;
line-height: 2.53;
text-align: center;
font-weight: 500;
background: #547af8;
}
.download {
margin-left: 20px;
width: 120px;
height: 34px;
border: 1px solid rgba(4, 10, 41, 0.12);
border-radius: 3px;
color: #051c35;
line-height: 2.53;
text-align: center;
font-weight: 500;
background: #fff;
}
</style>
</head>
<body>
<!--====== Header Part Start ======-->
<header class="header-one sticky-header">
<div class="header-navigation" style="padding-top: 10px;padding-bottom: 7px">
<div class="container-fluid d-flex align-items-center justify-content-between container-1470">
<div class="header-left">
<h1 href="index.html" style="color: black">Serverless Registry</h1>
</div>
<div class="header-right d-flex align-items-center justify-content-end">
<div class="site-nav-menu">
<ul class="primary-menu">
<li>
<a class="nav-link" href="index.html">首页</a>
</li>
<li class="current">
<a class="nav-link" href="special.html">专题</a>
</li>
<li>
<a class="nav-link" href="application.html">应用</a>
</li>
<li>
<a class="nav-link" href="component.html">组件</a>
</li>
<li>
<a class="nav-link" href="plugin.html">插件</a>
</li>
<li>
<a class="nav-link"
href="https://github.com/Serverless-Devs/Serverless-Devs/blob/master/spec/zh/0.0.2/serverless_registry_model/readme.md"
target="_blank">规范</a>
</li>
<li>
<a class="nav-link" href="faq.html">常见问题</a>
</li>
</ul>
<a href="#0" class="nav-close"><i class="fal fa-times"></i></a>
</div>
<div class="header-extra d-flex align-items-center">
<div class="search-widget">
<a href="#0" class="search-icon"><i class="fal fa-search"></i></a>
<div class="search-form">
<form action="search.html" method="GET">
<input type="search" placeholder="请输入要搜索的 Serverless Package 关键词" name="keyword">
</form>
<a href="#0" class="search-close"><i class="fal fa-times"></i></a>
</div>
</div>
<div class="offcanvas-widget d-none">
<div class="offcanvas-icon">
<span></span><span></span><span></span>
</div>
</div>
<div class="nav-toggler">
<span></span><span></span><span></span>
</div>
</div>
</div>
</div>
</div>
</header>
<!--====== Header Part End ======-->
<!--====== Banner Start ======-->
<section class="breadcrumb-area">
<div class="container">
<div class="content">
<h2 class="breadd wow fadeInUp" id="special_name">
专题
</h2>
<ul class="breadcrumb-list wow fadeInUp">
<li><a href="index.html">首页 /</a></li>
<li>专题</li>
</ul>
</div>
</div>
</section>
<!--====== Banner End ======-->
<!--====== Unique Themes Start ======-->
<section class="unique themes product market">
<div class="container" id="special">
<div class="row" id="special_detail">
<div class="col-lg-12 wow fadeInUp">
<div class="view-all mb-30">
<p class="text"></p>
</div>
</div>
</div>
</div>
</section>
<!--====== Unique Themes End ======-->
<!--====== Footer Area START ======-->
<footer class="footer-area two">
<div class="container">
<div class="row justify-content-between">
<div class="col-lg-4 col-md-6 wow fadeInUp" data-wow-delay="0.2s">
<div class="footer-box one">
<div class="logo">
<h1 style="color: white">Serverless Registry</h1>
</div>
<p class="text">Serverless Registry 是 Serverless Devs 社区的衍生品,遵循 Serverless Devs Model 规范,为打造
Serverless 生态基础,繁荣 Serverless 开源生态而努力。正在为成为好用的 Serverless 领域的 NPM,Pypi ... 而努力。 </p>
<div class="social">
<a href="https://github.com/serverless-devs/serverless-devs"><i class="fab fa-github"></i></a>
<a href="https://gitee.com/serverless-devs/Serverless-Devs"><i class="fab fa-git"></i></a>
<a href="https://www.serverless-devs.com"><i class="fab fa-page4"></i></a>
</div>
</div>
</div>
<div class="col-lg-2 col-md-6 wow fadeInUp" data-wow-delay="0.3s">
<div class="footer-box two">
<h4 class="lasthead">相关资源</h4>
<div class="footer-list">
<ul>
<li><a href="about.html"> 关于我们 </a></li>
<li><a href="https://github.com/serverless-devs/serverless-devs"> Serverless Devs 仓库 </a>
</li>
<li><a href="https://github.com/Serverless-Devs/Serverless-Devs/blob/master/spec/readme.md">
SDM 规范文档 </a></li>
<li><a href="https://github.com/Serverless-Devs/Serverless-Devs/discussions"> Serverless
Devs 社区 </a></li>
<li>
<a href="https://github.com/Serverless-Devs/Serverless-Devs/blob/master/CONTRIBUTORS.md">
贡献者列表 </a></li>
</ul>
</div>
</div>
</div>
<div class="col-lg-2 col-md-6 wow fadeInUp" data-wow-delay="0.4s">
<div class="footer-box three">
<h4 class="lasthead">钉钉交流群</h4>
<div class="footer-list">
<img src="https://serverless-article-picture.oss-cn-hangzhou.aliyuncs.com/1648814797378_20220401120637498673.png">
</div>
</div>
</div>
<div class="col-lg-2 col-md-6 wow fadeInUp" data-wow-delay="0.5s">
<div class="footer-box none">
<h4 class="lasthead">微信公众号</h4>
<div class="footer-list">
<img src="https://serverless-article-picture.oss-cn-hangzhou.aliyuncs.com/1648814758343_20220401120558862369.png">
</div>
</div>
</div>
</div>
</div>
</footer>
<div class="copyright two">
<div class="container">
<div class="row">
<div class="col-12 wow fadeInUp text-center">
<p class="text">Copyright © 2022. Serverless Devs; By <a href="http://www.bluo.cn" target="_blank">Anycodes</a>;
<a href="https://beian.miit.gov.cn/" target="_blank">浙ICP备19029259号</a>
</p>
</div>
</div>
</div>
</div>
<!--====== Footer Area END ======-->
<!--====== Back to top start ======-->
<div class="back-to-top">
<a href="#0"> <i class="fas fa-arrow-up"></i> </a>
</div>
<!--====== Back to top start ======-->
<!--====== Jquery ======-->
<script src="static/js/jquery-3.6.0.min.js"></script>
<!--====== Bootstrap ======-->
<script src="static/js/bootstrap.bundle.min.js"></script>
<!--=== Owl-Carousel ===-->
<script src="static/js/owl.carousel.min.js"></script>
<!--====== Nice Select ======-->
<script src="static/js/jquery.nice-select.min.js"></script>
<!--====== Magnific ======-->
<script src="static/js/jquery.magnific-popup.min.js"></script>
<!--====== Wow ======-->
<script src="static/js/wow.min.js"></script>
<!--====== Main JS ======-->
<script src="static/js/main.js"></script>
<script>
function getQueryString(name) {
var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i');
var r = window.location.search.substr(1).match(reg);
if (r != null) {
return unescape(r[2]);
}
return null;
}
function getSpecialDetail() {
const thisid = Number(getQueryString("id"))
const xmlhttp = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHTTP");
xmlhttp.open("GET", 'https://registry.devsapp.cn/console/applications?type=registry', false);
xmlhttp.onreadystatechange = function () {
if (xmlhttp.readyState === 4 && xmlhttp.status === 200) {
let itemString = ``
const result = JSON.parse(xmlhttp.responseText).Response
const keys = Object.keys(result)
const times = [0.3, 0.2, 0.1]
for (let i = 0; i < keys.length; i++) {
if (result[keys[i]].tabs.includes(thisid)) {
itemString = itemString + `<div class="col-xl-4 wow fadeInUp" data-wow-delay="${times[Math.floor((Math.random() * times.length))]}s">
<div class="themes-box">
<div class="main-content">
<h5><a href="details.html?name=${result[keys[i]].package}" class="text-flow-ellipsis-single">${result[keys[i]].title.length > 27 ? result[keys[i]].title.slice(0, 27) + '...' : result[keys[i]].title}</a> <i class="fas fa-fire" style="float: right; color: orange;"> ${result[keys[i]].download} </i></h5>
<div class="last-part">
<div class="right" style="width: 100%">
<p class="text" style="margin-bottom: 10px; width: 100%">
<i class="fas fa-calendar"></i> ${result[keys[i]].version.published_at.split('T')[0]} |
<i class="fas fa-desktop"></i> V${result[keys[i]].version.tag_name}
</p>
<p class="text-flow-ellipsis-multiple" style="height: 70px">
${result[keys[i]].description}
</p>
</div>
</div>
<div class="past-part" style="margin-top: 10px">
<center>
<div class="buton">
<a href="details.html?name=${result[keys[i]].package}" class="preButton"> <i class="fas fa-book"></i> 查看详情 </a>
<a href='https://fcnext.console.aliyun.com/applications/create?template=${result[keys[i]].package}' target="_blank" class="download"> <i class="fas fa-running"></i> 立即部署 </a>
</div>
</center>
</div>
</div>
</div>
</div>
</div>`
}
}
document.getElementById(`special_detail`).innerHTML = itemString
}
}
xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlhttp.send();
}
function getSpecialInfo() {
const thisid = Number(getQueryString("id"))
const xmlhttp = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHTTP");
xmlhttp.open("GET", 'https://registry.devsapp.cn/console/tabs?type=registry', false);
xmlhttp.onreadystatechange = function () {
if (xmlhttp.readyState === 4 && xmlhttp.status === 200) {
const result = JSON.parse(xmlhttp.responseText).Response
const keys = Object.keys(result)
for (let i = 0; i < keys.length; i++) {
if (String(result[keys[i]].id) === getQueryString("id")) {
document.getElementById(`special_name`).innerHTML = result[keys[i]].name
}
}
}
}
xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlhttp.send();
}
getSpecialInfo()
getSpecialDetail()
</script>
</body>
</html>