diff --git a/_config.yml b/_config.yml
index 8a2dfec..2686932 100644
--- a/_config.yml
+++ b/_config.yml
@@ -32,6 +32,10 @@ hide_navbar: false
hide_download: false
hide_server_status: false
+mirrorz_host: "https://mirrors.cernet.edu.cn"
+mirrorz_help_host: "https://help.mirrors.cernet.edu.cn"
+mirrorz_help_mirror: "TUNA"
+
# Build settings
highlighter: rouge
markdown: kramdown
diff --git a/_data/options.yml b/_data/options.yml
index 4885cb2..06accec 100644
--- a/_data/options.yml
+++ b/_data/options.yml
@@ -525,6 +525,9 @@ unlisted_mirrors:
name: "thuthesis"
url: '/github-release/tuna/thuthesis'
+mirrorz_help:
+ - name: AOSP
+
force_redirect_help_mirrors:
- AOSP
- lineageOS
diff --git a/_layouts/index.html b/_layouts/index.html
index eb7e2a0..0157c0b 100644
--- a/_layouts/index.html
+++ b/_layouts/index.html
@@ -76,6 +76,7 @@
{{mir.name}}
new
{% endraw %}{% fa_svg fas.fa-question-circle %}{% raw %}[Help]
+ [CERNET Help]
{% endraw %}{% fa_svg fab.fa-github %}{% raw %}[GitHub Release]
diff --git a/static/css/style.scss b/static/css/style.scss
index 8cf9188..c12307f 100644
--- a/static/css/style.scss
+++ b/static/css/style.scss
@@ -540,7 +540,7 @@ body {
}
{% endfor %}
-svg.icon {
+svg.icon, .mirrorz-icon {
display: inline-block;
width: 1em;
height: 1.42857143em;
@@ -548,6 +548,12 @@ svg.icon {
vertical-align: bottom;
}
+.mirrorz-icon {
+ background-color: currentColor;
+ -webkit-mask: url({{ site.mirrorz_host }}/static/img/mirrorz.svg) no-repeat center;
+ mask: url({{ site.mirrorz_host }}/static/img/mirrorz.svg) no-repeat center;
+}
+
.h1, .h2, .h3, .h4, .h5, .h6, h1, h2, h3, h4, h5, h6 {
svg.icon {
height: 1.1em;
diff --git a/static/js/index.es6 b/static/js/index.es6
index 32d90f9..ca6b692 100644
--- a/static/js/index.es6
+++ b/static/js/index.es6
@@ -14,6 +14,8 @@ var options = {};
global_options.options.force_redirect_help_mirrors.forEach((m) => options[m] = {'url': "/help/" + m + "/"})
var descriptions = {};
global_options.options.mirror_desc.forEach((m) => descriptions[m.name] = m.desc);
+var mirrorz_help = {};
+global_options.options.mirrorz_help.forEach((m) => mirrorz_help[m.name] = m.cname ? m.cname : m.name);
new Vue({
el: "#upgrade-mask",
@@ -145,6 +147,9 @@ var processMirrorItem = function(d){
d = $.extend(d, options[d.name]);
}
d.help_url = help_url[d.name];
+ if (mirrorz_help[d.name] !== undefined) {
+ d.mirrorz_help_url = "{{ site.mirrorz_help_host }}/" + mirrorz_help[d.name] + "/?mirror={{ site.mirrorz_help_mirror }}";
+ }
d.is_new = Boolean(new_mirrors[d.name]);
d.description = descriptions[d.name];
d.github_release = d.url && d.url.startsWith('/github-release/');
|