From 58ad92fd3a23025bb955169f73a646923b7164ad Mon Sep 17 00:00:00 2001 From: Xavier Yao Date: Sun, 6 Nov 2016 23:21:52 +0800 Subject: [PATCH 01/18] tensorflow help --- _posts/help/1970-01-01-tensorflow.md | 21 +++++++++++++++++++++ _posts/news/2016-11-06-tensorflow.md | 8 ++++++++ 2 files changed, 29 insertions(+) create mode 100644 _posts/help/1970-01-01-tensorflow.md create mode 100644 _posts/news/2016-11-06-tensorflow.md diff --git a/_posts/help/1970-01-01-tensorflow.md b/_posts/help/1970-01-01-tensorflow.md new file mode 100644 index 0000000..1685a30 --- /dev/null +++ b/_posts/help/1970-01-01-tensorflow.md @@ -0,0 +1,21 @@ +--- +category: help +layout: help +mirrorid: tensorflow +--- + +# TensorFlow 镜像使用帮助 + +TensorFlow 安装方法请参考 https://www.tensorflow.org/get_started 。将 + +```bash +export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.11.0rc2-cp27-none-linux_x86_64.whl +``` + +替换成 + +```bash +export TF_BINARY_URL=https://mirrors.tuna.tsinghua.edu.cn/tensorflow/linux/cpu/tensorflow-0.11.0rc2-cp27-none-linux_x86_64.whl +``` + +即可。其他平台同理。 diff --git a/_posts/news/2016-11-06-tensorflow.md b/_posts/news/2016-11-06-tensorflow.md new file mode 100644 index 0000000..9b23b52 --- /dev/null +++ b/_posts/news/2016-11-06-tensorflow.md @@ -0,0 +1,8 @@ +--- +category: news +layout: news +title: "新增 Tensorflow 镜像" +author: Xavier Yao +--- + +TUNA 镜像站新增 Tensorflow 镜像。TensorFlow 是一个 Google 开发等采用数据流图(data flow graphs)、用于数值计算的开源软件库,被广泛应用于深度学习等领域。使用方法见[TensorFlow 镜像使用帮助](/help/tensorflow/)。 From e499c995cd17e0cfa6feeee6177d68493caad7d6 Mon Sep 17 00:00:00 2001 From: bigeagle Date: Sun, 6 Nov 2016 23:22:42 +0800 Subject: [PATCH 02/18] new elasticstack --- _config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_config.yml b/_config.yml index 83d93a2..85f3749 100644 --- a/_config.yml +++ b/_config.yml @@ -30,4 +30,4 @@ gems: exclude: [Gemfile, Gemfile.lock, README.md, gen_robot.sh, vendor] # Content Related -new_mirrors: [arch4edu, ros, elvish, HHVM, steamos, bjlx, loongson, tensorflow, elastic] +new_mirrors: [arch4edu, ros, elvish, HHVM, steamos, bjlx, loongson, tensorflow, elasticstack] From c0bc054413fe9389a3279d7c9eee09ea3e05ddc9 Mon Sep 17 00:00:00 2001 From: Harry Chen Date: Mon, 7 Nov 2016 10:34:48 +0800 Subject: [PATCH 03/18] More news Signed-off-by: Harry Chen --- _posts/news/2016-11-06-tensorflow-and-others.md | 17 +++++++++++++++++ _posts/news/2016-11-06-tensorflow.md | 8 -------- 2 files changed, 17 insertions(+), 8 deletions(-) create mode 100644 _posts/news/2016-11-06-tensorflow-and-others.md delete mode 100644 _posts/news/2016-11-06-tensorflow.md diff --git a/_posts/news/2016-11-06-tensorflow-and-others.md b/_posts/news/2016-11-06-tensorflow-and-others.md new file mode 100644 index 0000000..635d7fd --- /dev/null +++ b/_posts/news/2016-11-06-tensorflow-and-others.md @@ -0,0 +1,17 @@ +--- +category: news +layout: news +title: "新增 Tensorflow 等一系列镜像" +author: Xavier Yao & Harry Chen +--- + +TUNA 镜像站新增 TensorFlow 镜像。TensorFlow 是一个 Google 开发等采用数据流图(data flow graphs)、用于数值计算的开源软件库,被广泛应用于深度学习等领域。使用方法见 [TensorFlow 镜像使用帮助](/help/tensorflow/)。 +除了 TensorFlow 之外,我们还新增了: +- arch4edu: 用于 ArchLnux 的一系列科研、教学所需工具 +- ros: 用于开发机器人的工具包 +- elvish: TUNA 前会长 [xiaq](https://github.com/xiaq) 开发的革命性 Shell ,详见 [这里](https://elvish.io/) +- HHVM: 由 Facebook 开发的高性能 PHP 虚拟机 +- steamos: 不解释,剁手专用 +- bjlx: [北京龙芯 & Debian 俱乐部](http://www.bjlx.org.cn/) 的公开源 +- loongson: 用于龙芯电脑的软件包 +- elastic: 数据可视化与分析工具 \ No newline at end of file diff --git a/_posts/news/2016-11-06-tensorflow.md b/_posts/news/2016-11-06-tensorflow.md deleted file mode 100644 index 9b23b52..0000000 --- a/_posts/news/2016-11-06-tensorflow.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -category: news -layout: news -title: "新增 Tensorflow 镜像" -author: Xavier Yao ---- - -TUNA 镜像站新增 Tensorflow 镜像。TensorFlow 是一个 Google 开发等采用数据流图(data flow graphs)、用于数值计算的开源软件库,被广泛应用于深度学习等领域。使用方法见[TensorFlow 镜像使用帮助](/help/tensorflow/)。 From 4c19b4804deb2480f6cf054f4d1d96c0e4f892b0 Mon Sep 17 00:00:00 2001 From: Harry Chen Date: Mon, 7 Nov 2016 10:39:57 +0800 Subject: [PATCH 04/18] Fix typos and reorgnize Signed-off-by: Harry Chen --- _posts/news/2016-11-06-tensorflow-and-others.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/_posts/news/2016-11-06-tensorflow-and-others.md b/_posts/news/2016-11-06-tensorflow-and-others.md index 635d7fd..6fa98b9 100644 --- a/_posts/news/2016-11-06-tensorflow-and-others.md +++ b/_posts/news/2016-11-06-tensorflow-and-others.md @@ -5,8 +5,9 @@ title: "新增 Tensorflow 等一系列镜像" author: Xavier Yao & Harry Chen --- -TUNA 镜像站新增 TensorFlow 镜像。TensorFlow 是一个 Google 开发等采用数据流图(data flow graphs)、用于数值计算的开源软件库,被广泛应用于深度学习等领域。使用方法见 [TensorFlow 镜像使用帮助](/help/tensorflow/)。 -除了 TensorFlow 之外,我们还新增了: +TUNA 镜像站新增一系列镜像。 + +- tensorflow: Google 开发的、采用数据流图(data flow graphs)、用于数值计算的开源软件库,被广泛应用于深度学习等领域。使用方法见 [TensorFlow 镜像使用帮助](/help/tensorflow/)。 - arch4edu: 用于 ArchLnux 的一系列科研、教学所需工具 - ros: 用于开发机器人的工具包 - elvish: TUNA 前会长 [xiaq](https://github.com/xiaq) 开发的革命性 Shell ,详见 [这里](https://elvish.io/) From a3b62819debf1cc44a6516375d40f9c126a9cbe8 Mon Sep 17 00:00:00 2001 From: bigeagle Date: Mon, 7 Nov 2016 11:03:03 +0800 Subject: [PATCH 05/18] update description of elastic stack, and fix centos help template --- _posts/help/1970-01-01-centos.md | 6 +----- _posts/news/2016-11-06-tensorflow-and-others.md | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/_posts/help/1970-01-01-centos.md b/_posts/help/1970-01-01-centos.md index 9189164..36061a7 100644 --- a/_posts/help/1970-01-01-centos.md +++ b/_posts/help/1970-01-01-centos.md @@ -61,7 +61,6 @@ baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/extras/$basearch #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-{{release_name}} - {{if release_name|equals>5}} #packages used/produced in the build but not released [addons] @@ -79,7 +78,6 @@ baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/centosplus/$base gpgcheck=1 enabled=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-{{release_name}} - {{if release_name|between>5>6}} #contrib - packages by Centos Users [contrib] @@ -88,9 +86,7 @@ baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/contrib/$basearc #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib gpgcheck=1 enabled=0 -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-{{release_name}} - -{{/if}} +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-{{release_name}}{{/if}} {% endraw %} diff --git a/_posts/news/2016-11-06-tensorflow-and-others.md b/_posts/news/2016-11-06-tensorflow-and-others.md index 6fa98b9..b97da94 100644 --- a/_posts/news/2016-11-06-tensorflow-and-others.md +++ b/_posts/news/2016-11-06-tensorflow-and-others.md @@ -15,4 +15,4 @@ TUNA 镜像站新增一系列镜像。 - steamos: 不解释,剁手专用 - bjlx: [北京龙芯 & Debian 俱乐部](http://www.bjlx.org.cn/) 的公开源 - loongson: 用于龙芯电脑的软件包 -- elastic: 数据可视化与分析工具 \ No newline at end of file +- elasticstack: ELK 系列数据分析工具,5.x 之后改名为 elastic stack From 52bd306e500a0b664a4cefed26ae2e3d1e53b433 Mon Sep 17 00:00:00 2001 From: bigeagle Date: Mon, 7 Nov 2016 11:05:07 +0800 Subject: [PATCH 06/18] make centos 7 default --- _posts/help/1970-01-01-centos.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/_posts/help/1970-01-01-centos.md b/_posts/help/1970-01-01-centos.md index 36061a7..4ca3c2b 100644 --- a/_posts/help/1970-01-01-centos.md +++ b/_posts/help/1970-01-01-centos.md @@ -17,9 +17,9 @@ sudo mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
@@ -45,7 +45,6 @@ baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/os/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-{{release_name}} - #released updates [updates] name=CentOS-$releasever - Updates From 7d6f2b1d71a68db139a45c640414af6eccc3c23e Mon Sep 17 00:00:00 2001 From: Harry Chen Date: Mon, 7 Nov 2016 11:30:33 +0800 Subject: [PATCH 07/18] Change font for authors in news page and fix a typo Signed-off-by: Harry Chen --- _posts/news/2016-11-06-tensorflow-and-others.md | 2 +- static/css/style.scss | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/_posts/news/2016-11-06-tensorflow-and-others.md b/_posts/news/2016-11-06-tensorflow-and-others.md index 6fa98b9..865e866 100644 --- a/_posts/news/2016-11-06-tensorflow-and-others.md +++ b/_posts/news/2016-11-06-tensorflow-and-others.md @@ -8,7 +8,7 @@ author: Xavier Yao & Harry Chen TUNA 镜像站新增一系列镜像。 - tensorflow: Google 开发的、采用数据流图(data flow graphs)、用于数值计算的开源软件库,被广泛应用于深度学习等领域。使用方法见 [TensorFlow 镜像使用帮助](/help/tensorflow/)。 -- arch4edu: 用于 ArchLnux 的一系列科研、教学所需工具 +- arch4edu: 用于 ArchLinux 的一系列科研、教学所需工具 - ros: 用于开发机器人的工具包 - elvish: TUNA 前会长 [xiaq](https://github.com/xiaq) 开发的革命性 Shell ,详见 [这里](https://elvish.io/) - HHVM: 由 Facebook 开发的高性能 PHP 虚拟机 diff --git a/static/css/style.scss b/static/css/style.scss index c42edd2..217e255 100644 --- a/static/css/style.scss +++ b/static/css/style.scss @@ -125,6 +125,9 @@ $font_local: 'Heiti SC', 'Hiragino Sans GB', 'STHeiti', 'Source Han Sans CN', 'W color: $color_grey; } } + .fa-user { + font-family: #{$font_default}, 'FontAwesome'; + } } /* Footer */ From ac8aa9fcd5afbb064ae15d542e955eb2211b5b35 Mon Sep 17 00:00:00 2001 From: bigeagle Date: Sun, 13 Nov 2016 13:41:18 +0800 Subject: [PATCH 08/18] tensorflow link --- _posts/help/1970-01-01-tensorflow.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_posts/help/1970-01-01-tensorflow.md b/_posts/help/1970-01-01-tensorflow.md index 1685a30..20d866b 100644 --- a/_posts/help/1970-01-01-tensorflow.md +++ b/_posts/help/1970-01-01-tensorflow.md @@ -6,7 +6,7 @@ mirrorid: tensorflow # TensorFlow 镜像使用帮助 -TensorFlow 安装方法请参考 https://www.tensorflow.org/get_started 。将 +TensorFlow 安装方法请参考 。将 ```bash export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.11.0rc2-cp27-none-linux_x86_64.whl From afa4b0c694cc6ff6b535814407a1a39e0dbacb3b Mon Sep 17 00:00:00 2001 From: bigeagle Date: Sun, 13 Nov 2016 15:01:57 +0800 Subject: [PATCH 09/18] rewrite tensorflow help --- _includes/head.html | 1 + _posts/help/1970-01-01-tensorflow.md | 92 +++++++++++++++++++++++++--- static/js/help.es6 | 1 - static/js/vue.min.js | 8 +++ 4 files changed, 92 insertions(+), 10 deletions(-) create mode 100644 static/js/vue.min.js diff --git a/_includes/head.html b/_includes/head.html index 283fa08..ccce576 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -12,6 +12,7 @@ + diff --git a/_posts/help/1970-01-01-tensorflow.md b/_posts/help/1970-01-01-tensorflow.md index 20d866b..4da8e8b 100644 --- a/_posts/help/1970-01-01-tensorflow.md +++ b/_posts/help/1970-01-01-tensorflow.md @@ -6,16 +6,90 @@ mirrorid: tensorflow # TensorFlow 镜像使用帮助 -TensorFlow 安装方法请参考 。将 +请先安装 python 环境,科学计算用途建议安装 [anaconda](/help/anaconda/)。 +TensorFlow 安装方法请参考 ,把 `https://storage.googleapis.com/` 替换为 `https://mirrors.tuna.tsinghua.edu.cn/` +即可。 -```bash -export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.11.0rc2-cp27-none-linux_x86_64.whl -``` +或直接运行下列命令,一步完成整个安装过程。 -替换成 -```bash -export TF_BINARY_URL=https://mirrors.tuna.tsinghua.edu.cn/tensorflow/linux/cpu/tensorflow-0.11.0rc2-cp27-none-linux_x86_64.whl -``` +{% raw %} +
+
+
+ + -即可。其他平台同理。 + + + + + + + + + +
+
+

+
+pip install \
+  -i https://pypi.tuna.tsinghua.edu.cn/simple/ \
+  https://mirrors.tuna.tsinghua.edu.cn/tensorflow/{{form.os}}/{{form.xpu}}/tensorflow-{{form.tfver}}-{{pytag}}.whl
+
+
+ + +{% endraw %} diff --git a/static/js/help.es6 b/static/js/help.es6 index 766bb02..0520d23 100644 --- a/static/js/help.es6 +++ b/static/js/help.es6 @@ -33,7 +33,6 @@ $(document).ready(() => { let help_url = $(ev.target).find("option:selected").data('help-url'); window.location = `${window.location.protocol}//${window.location.host}${help_url}`; }); - }); // vim: ts=2 sts=2 sw=2 noexpandtab diff --git a/static/js/vue.min.js b/static/js/vue.min.js new file mode 100644 index 0000000..622631e --- /dev/null +++ b/static/js/vue.min.js @@ -0,0 +1,8 @@ +/*! + * Vue.js v2.0.5 + * (c) 2014-2016 Evan You + * Released under the MIT License. + */ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.Vue=t()}(this,function(){"use strict";function e(e){return null==e?"":"object"==typeof e?JSON.stringify(e,null,2):String(e)}function t(e){var t=parseFloat(e,10);return t||0===t?t:e}function n(e,t){for(var n=Object.create(null),r=e.split(","),i=0;i-1)return e.splice(n,1)}}function i(e,t){return Er.call(e,t)}function o(e){return"string"==typeof e||"number"==typeof e}function a(e){var t=Object.create(null);return function(n){var r=t[n];return r||(t[n]=e(n))}}function s(e,t){function n(n){var r=arguments.length;return r?r>1?e.apply(t,arguments):e.call(t,n):e.call(t)}return n._length=e.length,n}function c(e,t){t=t||0;for(var n=e.length-t,r=new Array(n);n--;)r[n]=e[n+t];return r}function u(e,t){for(var n in t)e[n]=t[n];return e}function l(e){return null!==e&&"object"==typeof e}function f(e){return Pr.call(e)===Rr}function d(e){for(var t={},n=0;n=0&&ei[n].id>e.id;)n--;ei.splice(Math.max(n,ii)+1,0,e)}else ei.push(e);ni||(ni=!0,Gr(x))}}function A(e){si.clear(),O(e,si)}function O(e,t){var n,r,i=Array.isArray(e);if((i||l(e))&&Object.isExtensible(e)){if(e.__ob__){var o=e.__ob__.dep.id;if(t.has(o))return;t.add(o)}if(i)for(n=e.length;n--;)O(e[n],t);else for(r=Object.keys(e),n=r.length;n--;)O(e[r[n]],t)}}function T(e,t){e.__proto__=t}function S(e,t,n){for(var r=0,i=n.length;r1?c(n):n;for(var r=c(arguments,1),i=0,o=n.length;i-1?zi[e]=t.constructor===window.HTMLUnknownElement||t.constructor===window.HTMLElement:zi[e]=/HTMLUnknownElement/.test(t.toString())}function Ge(e){if("string"==typeof e){if(e=document.querySelector(e),!e)return document.createElement("div")}return e}function Ye(e,t){var n=document.createElement(e);return"select"!==e?n:(t.data&&t.data.attrs&&"multiple"in t.data.attrs&&n.setAttribute("multiple","multiple"),n)}function Qe(e,t){return document.createElementNS(Mi[e],t)}function Xe(e){return document.createTextNode(e)}function et(e){return document.createComment(e)}function tt(e,t,n){e.insertBefore(t,n)}function nt(e,t){e.removeChild(t)}function rt(e,t){e.appendChild(t)}function it(e){return e.parentNode}function ot(e){return e.nextSibling}function at(e){return e.tagName}function st(e,t){e.textContent=t}function ct(e){return e.childNodes}function ut(e,t,n){e.setAttribute(t,n)}function lt(e,t){var n=e.data.ref;if(n){var i=e.context,o=e.child||e.elm,a=i.$refs;t?Array.isArray(a[n])?r(a[n],o):a[n]===o&&(a[n]=void 0):e.data.refInFor?Array.isArray(a[n])?a[n].push(o):a[n]=[o]:a[n]=o}}function ft(e){return null==e}function dt(e){return null!=e}function pt(e,t){return e.key===t.key&&e.tag===t.tag&&e.isComment===t.isComment&&!e.data==!t.data}function vt(e,t,n){var r,i,o={};for(r=t;r<=n;++r)i=e[r].key,dt(i)&&(o[i]=r);return o}function ht(e){function t(e){return new vi(C.tagName(e).toLowerCase(),{},[],void 0,e)}function n(e,t){function n(){0===--n.listeners&&r(e)}return n.listeners=t,n}function r(e){var t=C.parentNode(e);t&&C.removeChild(t,e)}function i(e,t,n){var r,i=e.data;if(e.isRootInsert=!n,dt(i)&&(dt(r=i.hook)&&dt(r=r.init)&&r(e),dt(r=e.child)))return u(e,t),e.elm;var o=e.children,s=e.tag;return dt(s)?(e.elm=e.ns?C.createElementNS(e.ns,s):C.createElement(s,e),l(e),a(e,o,t),dt(i)&&c(e,t)):e.isComment?e.elm=C.createComment(e.text):e.elm=C.createTextNode(e.text),e.elm}function a(e,t,n){if(Array.isArray(t))for(var r=0;rv?(u=ft(n[y+1])?null:n[y+1].elm,f(e,u,n,d,y,r)):d>y&&p(e,t,l,v)}function m(e,t,n,r){if(e!==t){if(t.isStatic&&e.isStatic&&t.key===e.key&&(t.isCloned||t.isOnce))return void(t.elm=e.elm);var i,o=t.data,a=dt(o);a&&dt(i=o.hook)&&dt(i=i.prepatch)&&i(e,t);var c=t.elm=e.elm,u=e.children,l=t.children;if(a&&s(t)){for(i=0;i<$.update.length;++i)$.update[i](e,t);dt(i=o.hook)&&dt(i=i.update)&&i(e,t)}ft(t.text)?dt(u)&&dt(l)?u!==l&&h(c,u,l,n,r):dt(l)?(dt(e.text)&&C.setTextContent(c,""),f(c,null,l,0,l.length-1,n)):dt(u)?p(c,u,0,u.length-1):dt(e.text)&&C.setTextContent(c,""):e.text!==t.text&&C.setTextContent(c,t.text),a&&dt(i=o.hook)&&dt(i=i.postpatch)&&i(e,t)}}function g(e,t,n){if(n&&e.parent)e.parent.data.pendingInsert=t;else for(var r=0;r-1?t.split(/\s+/).forEach(function(t){return e.classList.add(t)}):e.classList.add(t);else{var n=" "+e.getAttribute("class")+" ";n.indexOf(" "+t+" ")<0&&e.setAttribute("class",(n+t).trim())}}function Ot(e,t){if(t&&t.trim())if(e.classList)t.indexOf(" ")>-1?t.split(/\s+/).forEach(function(t){return e.classList.remove(t)}):e.classList.remove(t);else{for(var n=" "+e.getAttribute("class")+" ",r=" "+t+" ";n.indexOf(r)>=0;)n=n.replace(r," ");e.setAttribute("class",n.trim())}}function Tt(e){vo(function(){vo(e)})}function St(e,t){(e._transitionClasses||(e._transitionClasses=[])).push(t),At(e,t)}function Et(e,t){e._transitionClasses&&r(e._transitionClasses,t),Ot(e,t)}function jt(e,t,n){var r=Lt(e,t),i=r.type,o=r.timeout,a=r.propCount;if(!i)return n();var s=i===so?lo:po,c=0,u=function(){e.removeEventListener(s,l),n()},l=function(t){t.target===e&&++c>=a&&u()};setTimeout(function(){c0&&(n=so,l=a,f=o.length):t===co?u>0&&(n=co,l=u,f=c.length):(l=Math.max(a,u),n=l>0?a>u?so:co:null,f=n?n===so?o.length:c.length:0);var d=n===so&&ho.test(r[uo+"Property"]);return{type:n,timeout:l,propCount:f,hasTransform:d}}function Nt(e,t){for(;e.length1,T=t._enterCb=It(function(){A&&Et(t,$),T.cancelled?(A&&Et(t,b),k&&k(t)):x&&x(t),t._enterCb=null});e.data.show||K(e.data.hook||(e.data.hook={}),"insert",function(){var n=t.parentNode,r=n&&n._pending&&n._pending[e.key];r&&r.tag===e.tag&&r.elm._leaveCb&&r.elm._leaveCb(),C&&C(t,T)},"transition-insert"),w&&w(t),A&&(St(t,b),St(t,$),Tt(function(){Et(t,b),T.cancelled||O||jt(t,i,T)})),e.data.show&&C&&C(t,T),A||O||T()}}}function Pt(e,t){function n(){m.cancelled||(e.data.show||((r.parentNode._pending||(r.parentNode._pending={}))[e.key]=e),u&&u(r),v&&(St(r,s),St(r,c),Tt(function(){Et(r,s),m.cancelled||h||jt(r,a,m)})),l&&l(r,m),v||h||m())}var r=e.elm;r._enterCb&&(r._enterCb.cancelled=!0,r._enterCb());var i=Rt(e.data.transition);if(!i)return t();if(!r._leaveCb&&1===r.nodeType){var o=i.css,a=i.type,s=i.leaveClass,c=i.leaveActiveClass,u=i.beforeLeave,l=i.leave,f=i.afterLeave,d=i.leaveCancelled,p=i.delayLeave,v=o!==!1&&!Jr,h=l&&(l._length||l.length)>1,m=r._leaveCb=It(function(){r.parentNode&&r.parentNode._pending&&(r.parentNode._pending[e.key]=null),v&&Et(r,c),m.cancelled?(v&&Et(r,s),d&&d(r)):(t(),f&&f(r)),r._leaveCb=null});p?p(n):n()}}function Rt(e){if(e){if("object"==typeof e){var t={};return e.css!==!1&&u(t,mo(e.name||"v")),u(t,e),t}return"string"==typeof e?mo(e):void 0}}function It(e){var t=!1;return function(){t||(t=!0,e())}}function Bt(e,t,n){var r=t.value,i=e.multiple;if(!i||Array.isArray(r)){for(var o,a,s=0,c=e.options.length;s-1,a.selected!==o&&(a.selected=o);else if(h(Ht(a),r))return void(e.selectedIndex!==s&&(e.selectedIndex=s));i||(e.selectedIndex=-1)}}function Ft(e,t){for(var n=0,r=t.length;n',n.innerHTML.indexOf(t)>0}function en(e){return Eo.innerHTML=e,Eo.textContent}function tn(e,t){return t&&(e=e.replace(ba,"\n")),e.replace(ya,"<").replace(_a,">").replace($a,"&").replace(wa,'"')}function nn(e,t){function n(t){f+=t,e=e.substring(t)}function r(){var t=e.match(Ro);if(t){var r={tagName:t[1],attrs:[],start:f};n(t[0].length);for(var i,o;!(i=e.match(Io))&&(o=e.match(Do));)n(o[0].length),r.attrs.push(o);if(i)return r.unarySlash=i[1],n(i[0].length),r.end=f,r}}function i(e){var n=e.tagName,r=e.unarySlash;u&&("p"===s&&Bi(n)&&o("",s),Ii(n)&&s===n&&o("",n));for(var i=l(n)||"html"===n&&"head"===s||!!r,a=e.attrs.length,f=new Array(a),d=0;d=0&&c[o].tag.toLowerCase()!==a;o--);}else o=0;if(o>=0){for(var u=c.length-1;u>=o;u--)t.end&&t.end(c[u].tag,r,i);c.length=o,s=o&&c[o-1].tag}else"br"===n.toLowerCase()?t.start&&t.start(n,[],!0,r,i):"p"===n.toLowerCase()&&(t.start&&t.start(n,[],!1,r,i),t.end&&t.end(n,r,i))}for(var a,s,c=[],u=t.expectHTML,l=t.isUnaryTag||Ir,f=0;e;){if(a=e,s&&ma(s,t.sfc,c)){var d=s.toLowerCase(),p=ga[d]||(ga[d]=new RegExp("([\\s\\S]*?)(]*>)","i")),v=0,h=e.replace(p,function(e,n,r){return v=r.length,"script"!==d&&"style"!==d&&"noscript"!==d&&(n=n.replace(//g,"$1").replace(//g,"$1")),t.chars&&t.chars(n),""});f+=e.length-h.length,e=h,o("",d,f-v,f)}else{var m=e.indexOf("<");if(0===m){if(Ho.test(e)){var g=e.indexOf("-->");if(g>=0){n(g+3);continue}}if(Uo.test(e)){var y=e.indexOf("]>");if(y>=0){n(y+2);continue}}var _=e.match(Fo);if(_){n(_[0].length);continue}var b=e.match(Bo);if(b){var $=f;n(b[0].length),o(b[0],b[1],$,f);continue}var w=r();if(w){i(w);continue}}var C=void 0,x=void 0,k=void 0;if(m>0){for(x=e.slice(m);!(Bo.test(x)||Ro.test(x)||Ho.test(x)||Uo.test(x)||(k=x.indexOf("<",1),k<0));)m+=k,x=e.slice(m);C=e.substring(0,m),n(m)}m<0&&(C=e,e=""),t.chars&&C&&t.chars(C)}if(e===a&&t.chars){t.chars(e);break}}o()}function rn(e){function t(){(a||(a=[])).push(e.slice(d,i).trim()),d=i+1}var n,r,i,o,a,s=!1,c=!1,u=0,l=0,f=0,d=0;for(i=0;ia&&o.push(JSON.stringify(e.slice(a,i)));var s=rn(r[1].trim());o.push("_s("+s+")"),a=i+r[0].length}return a=sa}function pr(e){return 34===e||39===e}function vr(e){var t=1;for(fa=la;!dr();)if(e=fr(),pr(e))hr(e);else if(91===e&&t++,93===e&&t--,0===t){da=la;break}}function hr(e){for(var t=e;!dr()&&(e=fr(),e!==t););}function mr(e,t,n){pa=n;var r=t.value,i=t.modifiers,o=e.tag,a=e.attrsMap.type;return"select"===o?br(e,r,i):"input"===o&&"checkbox"===a?gr(e,r,i):"input"===o&&"radio"===a?yr(e,r,i):_r(e,r,i),!0}function gr(e,t,n){var r=n&&n.number,i=pn(e,"value")||"null",o=pn(e,"true-value")||"true",a=pn(e,"false-value")||"false";un(e,"checked","Array.isArray("+t+")?_i("+t+","+i+")>-1:_q("+t+","+o+")"),dn(e,"change","var $$a="+t+",$$el=$event.target,$$c=$$el.checked?("+o+"):("+a+");if(Array.isArray($$a)){var $$v="+(r?"_n("+i+")":i)+",$$i=_i($$a,$$v);if($$c){$$i<0&&("+t+"=$$a.concat($$v))}else{$$i>-1&&("+t+"=$$a.slice(0,$$i).concat($$a.slice($$i+1)))}}else{"+t+"=$$c}",null,!0)}function yr(e,t,n){var r=n&&n.number,i=pn(e,"value")||"null";i=r?"_n("+i+")":i,un(e,"checked","_q("+t+","+i+")"),dn(e,"change",$r(t,i),null,!0)}function _r(e,t,n){var r=e.attrsMap.type,i=n||{},o=i.lazy,a=i.number,s=i.trim,c=o||Vr&&"range"===r?"change":"input",u=!o&&"range"!==r,l="input"===e.tag||"textarea"===e.tag,f=l?"$event.target.value"+(s?".trim()":""):"$event";f=a||"number"===r?"_n("+f+")":f;var d=$r(t,f);l&&u&&(d="if($event.target.composing)return;"+d),un(e,"value",l?"_s("+t+")":"("+t+")"),dn(e,c,d,null,!0)}function br(e,t,n){var r=n&&n.number,i='Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;return '+(r?"_n(val)":"val")+"})"+(null==e.attrsMap.multiple?"[0]":""),o=$r(t,i);dn(e,"change",o,null,!0)}function $r(e,t){var n=lr(e);return null===n.idx?e+"="+t:"var $$exp = "+n.exp+", $$idx = "+n.idx+";if (!Array.isArray($$exp)){"+e+"="+t+"}else{$$exp.splice($$idx, 1, "+t+")}"}function wr(e,t){t.value&&un(e,"textContent","_s("+t.value+")")}function Cr(e,t){t.value&&un(e,"innerHTML","_s("+t.value+")")}function xr(e,t){return t=t?u(u({},Ka),t):Ka,or(e,t)}function kr(e,t,n){var r=(t&&t.warn||$i,t&&t.delimiters?String(t.delimiters)+e:e);if(qa[r])return qa[r];var i={},o=xr(e,t);i.render=Ar(o.render);var a=o.staticRenderFns.length;i.staticRenderFns=new Array(a);for(var s=0;s0,qr=zr&&zr.indexOf("edge/")>0,Kr=zr&&zr.indexOf("android")>0,Wr=zr&&/iphone|ipad|ipod|ios/.test(zr),Zr=Ur&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__,Gr=function(){function e(){r=!1;var e=n.slice(0);n.length=0;for(var t=0;t\/=]+)/,Lo=/(?:=)/,No=[/"([^"]*)"+/.source,/'([^']*)'+/.source,/([^\s"'=<>`]+)/.source],Do=new RegExp("^\\s*"+jo.source+"(?:\\s*("+Lo.source+")\\s*(?:"+No.join("|")+"))?"),Mo="[a-zA-Z_][\\w\\-\\.]*",Po="((?:"+Mo+"\\:)?"+Mo+")",Ro=new RegExp("^<"+Po),Io=/^\s*(\/?)>/,Bo=new RegExp("^<\\/"+Po+"[^>]*>"),Fo=/^]+>/i,Ho=/^ -

新闻公告

@@ -49,6 +46,13 @@ permalink: /
  • https://mirrors4.tuna.tsinghua.edu.cn/ 只解析 IPv4
  • +
    +

    下载链接

    +

    常用发行版 iso 和应用工具安装包直接下载

    + +

    联系我们

      @@ -76,6 +80,7 @@ permalink: / {% include footer.html %} + {% raw %}
    + {% endraw %} {% raw %} diff --git a/static/js/index.es6 b/static/js/index.es6 index b40f00d..eecffd6 100644 --- a/static/js/index.es6 +++ b/static/js/index.es6 @@ -89,49 +89,39 @@ window.refreshMirrorList = () => { setTimeout(refreshMirrorList, 10000); } -window.modal = () => { - var bx = document.getElementById("isomodal"); - bx.style.visibility = (bx.style.visibility == "visible") ? "hidden" : "visible"; -} - -window.switchDistro = () => { - var distro = document.getElementById("isodistro"); - var idx = distro.selectedIndex; - var s = document.getElementById('isoversion'); - s.options.length = 0; - for (var i = 0; i < isoinfo[idx].urls.length; i++) { - s.options[s.options.length] = new Option(isoinfo[idx].urls[i].name, i) - } - $('.selectpicker').selectpicker('refresh') - -} - -var refreshISOList = () => { - $.getJSON("/static/isoinfo.json", (isoinfo) => { - window.isoinfo = isoinfo; - window.s = document.getElementById("isodistro"); - s.options.length = 0; - for (var i = 0; i < isoinfo.length; i++) { - s.options[s.options.length] = new Option(isoinfo[i].distro, i); - } - $('.selectpicker').selectpicker('refresh') - switchDistro(); - }); -} - -$('#isodistro').change(switchDistro); -$('#btn_download').click(() => { - var distro = document.getElementById("isodistro"); - var version = document.getElementById("isoversion"); - var i = distro.selectedIndex; - var j = version.selectedIndex; - var link = isoinfo[i].urls[j].url; - window.open(link); - $('#isoModal').modal('toggle'); -}); -refreshISOList(); refreshMirrorList(); +var vm = new Vue({ + el: "#isoModal", + data: { + distroList: [], + selected: null, + curCategory: "os" + }, + created: function () { + var self = this; + $.getJSON("/static/isoinfo.json", function (isoinfo) { + self.distroList = isoinfo; + self.selected = self.curDistroList[0]; + }); + }, + computed: { + curDistroList () { + return this.distroList.filter((x)=> x.category === this.curCategory); + } + }, + methods: { + switchDistro (distro) { + this.selected = distro; + }, + switchCategory (category) { + this.curCategory = category; + this.selected = this.curDistroList[0]; + } + } + +}); + }); // vim: ts=2 sts=2 sw=2 noexpandtab