diff --git a/gulpfile.js b/gulpfile.js
index 06ed2fe..7965458 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -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']);
diff --git a/src/index.tpl.html b/src/index.tpl.html
index 2e2478b..6a05bf7 100644
--- a/src/index.tpl.html
+++ b/src/index.tpl.html
@@ -37,18 +37,18 @@
-
-
新闻公告
+
域名选择
- - http://mirrors.tuna.tsinghua.edu.cn/ 支持 IPv4/IPv6
+ - http://mirrors.tuna.tsinghua.edu.cn/ 自动选择
- http://mirrors.6.tuna.tsinghua.edu.cn/ 只解析 IPv6
- http://mirrors.4.tuna.tsinghua.edu.cn/ 只解析 IPv4
- http://mirrors.i.tuna.tsinghua.edu.cn/ 只解析清华 IP
@@ -79,8 +79,8 @@
{{if is_new}}new{{/if}}
{{if help}}{{/if}}
- {{last_update}}
- {{if show_status}}{{status}}{{/if}}
+ |
+ {{last_update}} {{if show_status}}{{status}}{{/if}}
|
{{/mirrors}}
diff --git a/src/js/news.js b/src/js/news.js
new file mode 100644
index 0000000..757cd4b
--- /dev/null
+++ b/src/js/news.js
@@ -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
diff --git a/src/news/index.tpl.html b/src/news/index.tpl.html
new file mode 100644
index 0000000..f047b58
--- /dev/null
+++ b/src/news/index.tpl.html
@@ -0,0 +1,36 @@
+
+
+ @@include('../include/_head.html')
+
+ @@include('../include/_nav.html')
+
+
+
+ @@include('../include/_footer.html')
+
+
+
+
+