mirror of
https://github.com/tuna/mirror-web.git
synced 2025-12-25 20:32:46 +00:00
added news
This commit is contained in:
parent
0f1321697e
commit
e2425b5c6d
|
|
@ -7,7 +7,7 @@ var gulp = require('gulp'),
|
|||
var path = {
|
||||
HTML_TPL: './src/**/*.tpl.html',
|
||||
HTML: './src/**/*.html',
|
||||
HELP_MD: './src/help/*.md',
|
||||
MD_FILES: './src/**/*.md',
|
||||
JS_FILES: './src/js/*.js',
|
||||
SCSS_FILES: './src/scss/*.scss',
|
||||
IMG: './src/img/*',
|
||||
|
|
@ -33,8 +33,8 @@ gulp.task('copy-img', function(){
|
|||
gulp.task('copy-html', function(){
|
||||
gulp.src(path.ROBOTS)
|
||||
.pipe(gulp.dest(path.DEST));
|
||||
gulp.src(path.HELP_MD)
|
||||
.pipe(gulp.dest(path.DEST+"/help"));
|
||||
gulp.src(path.MD_FILES)
|
||||
.pipe(gulp.dest(path.DEST));
|
||||
|
||||
gulp.src(path.HTML_TPL)
|
||||
.pipe(fileinclude())
|
||||
|
|
@ -49,6 +49,7 @@ gulp.task('copy-html', function(){
|
|||
|
||||
gulp.task('watch', function() {
|
||||
gulp.watch(path.HTML, ['copy-html']);
|
||||
gulp.watch(path.MD_FILES, ['copy-html']);
|
||||
gulp.watch(path.IMG, ['copy-img']);
|
||||
gulp.watch(path.SCSS_FILES, ['scss-build']);
|
||||
gulp.watch(path.JS_FILES, ['js-build']);
|
||||
|
|
|
|||
|
|
@ -37,18 +37,18 @@
|
|||
<div class="col-md-4">
|
||||
<div class="spacing hidden-xs"></div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<h4><span class="fa fa-bell-o"></span> 新闻公告 </h4>
|
||||
<div class="col-md-12" id="news">
|
||||
<h4><span class="fa fa-bullhorn"></span> 新闻公告 </h4>
|
||||
<ul>
|
||||
<li><strong>2015-10-10</strong> 更新 docker APT/YUM 镜像 </li>
|
||||
<li><strong>2015-10-09</strong> AOSP 镜像维护与调整 </li>
|
||||
<li><a href="/news/#docker-update"><strong>2015-10-10</strong> 更新 docker 镜像 </a></li>
|
||||
<li><a href="/news/#aosp-maintenance"><strong>2015-10-09</strong> AOSP 镜像维护与调整 </a></li>
|
||||
</ul>
|
||||
<span class="pull-right"><a href="/news"> more <span class="fa fa-angle-double-right"></span> </a></span>
|
||||
<span class="pull-right"><a href="/news/"> more <span class="fa fa-angle-double-right"></span> </a></span>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<h4> <span class="fa fa-link"></span> 域名选择 </h4>
|
||||
<ul>
|
||||
<li><a href="http://mirrors.tuna.tsinghua.edu.cn/">http://mirrors.tuna.tsinghua.edu.cn/</a> 支持 IPv4/IPv6</li>
|
||||
<li><a href="http://mirrors.tuna.tsinghua.edu.cn/">http://mirrors.tuna.tsinghua.edu.cn/</a> 自动选择 </li>
|
||||
<li><a href="http://mirrors.6.tuna.tsinghua.edu.cn/">http://mirrors.6.tuna.tsinghua.edu.cn/</a> 只解析 IPv6</li>
|
||||
<li><a href="http://mirrors.4.tuna.tsinghua.edu.cn/">http://mirrors.4.tuna.tsinghua.edu.cn/</a> 只解析 IPv4</li>
|
||||
<li><a href="http://mirrors.i.tuna.tsinghua.edu.cn/">http://mirrors.i.tuna.tsinghua.edu.cn/</a> 只解析清华 IP</li>
|
||||
|
|
@ -79,8 +79,8 @@
|
|||
{{if is_new}}<span class="label label-new">new</span>{{/if}}
|
||||
{{if help}}<a href="/help/#{{name}}"><i class="fa fa-question-circle" title="Help"></i></a>{{/if}}
|
||||
</td>
|
||||
<td class="col-md-4">{{last_update}}
|
||||
{{if show_status}}<span class="label label-status {{label}} hidden-xs">{{status}}</span>{{/if}}
|
||||
<td class="col-md-4">
|
||||
{{last_update}} {{if show_status}}<span class="label label-status {{label}} hidden-xs">{{status}}</span>{{/if}}
|
||||
</td>
|
||||
</tr>
|
||||
{{/mirrors}}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,13 @@
|
|||
$(document).ready(() => {
|
||||
|
||||
$.get("/news/news.md", function(data) {
|
||||
var rendered = marked(data);
|
||||
$("#news-content")
|
||||
.html(rendered)
|
||||
.find('table')
|
||||
.addClass("table table-bordered table-striped");
|
||||
$('#spinner').addClass('hidden');
|
||||
});
|
||||
|
||||
});
|
||||
// vim: ts=2 sts=2 sw=2 noexpandtab
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
@@include('../include/_head.html')
|
||||
<body>
|
||||
@@include('../include/_nav.html')
|
||||
|
||||
<div id="news-page">
|
||||
<div class="spacing"></div>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-2"></div>
|
||||
<div class="col-md-8">
|
||||
<div id="spinner">
|
||||
<i class="fa fa-spinner fa-spin"></i>
|
||||
<div>载入中</div>
|
||||
</div>
|
||||
<div>
|
||||
<h2><span class="fa fa-newspaper-o"></span> 镜像站新闻</h2>
|
||||
<div id="news-content"></div>
|
||||
</div>
|
||||
</div><!-- news content -->
|
||||
<div class="col-md-2"></div>
|
||||
</div>
|
||||
</div><!--/container -->
|
||||
<div class="spacing"></div>
|
||||
</div>
|
||||
|
||||
@@include('../include/_footer.html')
|
||||
</body>
|
||||
|
||||
<script src="/static/js/news.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
<!--
|
||||
vim: ts=2 sts=2 sw=2 noexpandtab
|
||||
-->
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
### # Docker APT/YUM 镜像更新
|
||||
<span id="docker-update" class="fa fa-calendar"></span> 2015-10-10
|
||||
|
||||
Docker 官方部署了[新的 docker 源](https://blog.docker.com/2015/07/new-apt-and-yum-repos/), 我们也对
|
||||
docker 镜像作出相应调整。
|
||||
|
||||
现在的镜像地址为:
|
||||
|
||||
- APT: http://mirrors.tuna.tsinghua.edu.cn/docker/apt/repo
|
||||
- YUM: http://mirrors.tuna.tsinghua.edu.cn/docker/yum/repo
|
||||
|
||||
请根据 [docker镜像帮助](/help/#docker) 调整至正确的打开方式。
|
||||
|
||||
----
|
||||
|
||||
### # AOSP 镜像调整
|
||||
<span id="aosp-maintenance" class="fa fa-calendar"></span> 2015-10-09
|
||||
|
||||
国庆长假后,AOSP镜像业务量激增,造成 mirrors 服务器严重超载。
|
||||
|
||||
我们尝试了如下策略降低服务器负载:
|
||||
|
||||
- 将服务更改为对 https://android.googlesource.com/ 的反向代理,但一段时间后即被 Google 做了流量限制
|
||||
- 更新 Git 版本,使用 Git 2.0+ 引入的 Bitmap 索引对所有仓库进行了一次 repack
|
||||
|
||||
经过接近两天的折腾,Bitmap 索引显著降低了服务器负载,在 10 月 10 日 AOSP 占满服务器带宽的情况下,Git 服务
|
||||
的CPU和内存占用率都在合理范围内。
|
||||
|
||||
目前 AOSP 镜像业务已完全恢复。
|
||||
|
||||
我们顺便完善了 AOSP 镜像的文档,如果你是团队用户,我们强烈建议你通过 TUNA 镜像建立次级镜像,减小 TUNA mirrors
|
||||
负载。详情请参考 [AOSP 镜像帮助](/help/#AOSP)。
|
||||
|
|
@ -86,6 +86,11 @@ $font_default: 'Lato', 'Heiti SC', 'Hiragino Sans GB', 'STHeiti', 'Source Han Sa
|
|||
color: #234961;
|
||||
}
|
||||
}
|
||||
#news {
|
||||
li > a {
|
||||
color: #384452
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#help-page {
|
||||
|
|
|
|||
Loading…
Reference in New Issue