mirror of
https://github.com/tuna/mirror-web.git
synced 2025-12-25 20:32:46 +00:00
[WIP] Redirect to cernet help
This commit is contained in:
parent
a4fa1ceb21
commit
1cf6d6c8db
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -525,6 +525,9 @@ unlisted_mirrors:
|
|||
name: "thuthesis"
|
||||
url: '/github-release/tuna/thuthesis'
|
||||
|
||||
mirrorz_help:
|
||||
- name: AOSP
|
||||
|
||||
force_redirect_help_mirrors:
|
||||
- AOSP
|
||||
- lineageOS
|
||||
|
|
|
|||
|
|
@ -76,6 +76,7 @@
|
|||
{{mir.name}}
|
||||
<span class="label label-new" v-if='mir.is_new'>new</span>
|
||||
<a v-if='mir.help_url' :href="mir.help_url"><i aria-hidden="true" class="question-circle" title="Help">{% endraw %}{% fa_svg fas.fa-question-circle %}{% raw %}</i><span class="sr-only">[Help]</span></a>
|
||||
<a v-if='mir.mirrorz_help_url' :href="mir.mirrorz_help_url"><div aria-hidden="true" class="mirrorz-icon" title="CERNET Help"></div><span class="sr-only">[CERNET Help]</span></a>
|
||||
<a v-if='mir.github_release' href="javascript:void(0)"><i aria-hidden="true" title="GitHub Release">{% endraw %}{% fa_svg fab.fa-github %}{% raw %}</i><span class="sr-only">[GitHub Release]</span></a>
|
||||
</td>
|
||||
<td class="col-md-4">
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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/');
|
||||
|
|
|
|||
Loading…
Reference in New Issue