2016-02-29 14:08:40 +08:00
<!DOCTYPE html>
< html >
2016-12-09 14:14:31 +08:00
< head >
< meta charset = "utf-8" >
< meta http-equiv = "X-UA-Compatible" content = "IE=edge" >
< meta name = "viewport" content = "width=device-width, initial-scale=1.0" >
2017-09-15 21:40:13 +08:00
< meta name = "description" content = "An enterprise-class UI design language and React-based implementation with a set of high-quality React components, one of best React UI library for enterprises" >
2017-01-09 22:37:57 +08:00
< title > Ant Design - A UI Design Language< / title >
2017-02-10 12:12:13 +08:00
< script >
(function() {
2017-02-21 13:36:17 +08:00
function isLocalStorageNameSupported() {
2017-03-05 20:13:32 +08:00
var testKey = 'test';
var storage = window.localStorage;
2017-02-21 13:36:17 +08:00
try {
storage.setItem(testKey, '1');
storage.removeItem(testKey);
return true;
} catch (error) {
return false;
}
}
2017-02-10 12:12:13 +08:00
// 优先级提高到所有静态资源的前面,语言不对,加载其他静态资源没意义
var pathname = location.pathname;
function isZhCN(pathname) {
return /-cn\/?$/.test(pathname);
}
function getLocalizedPathname(path, zhCN) {
var pathname = path.startsWith('/') ? path : '/' + path;
if (!zhCN) { // to enUS
return /\/?index-cn/.test(pathname) ? '/' : pathname.replace('-cn', '');
} else if (pathname === '/') {
return '/index-cn';
} else if (pathname.endsWith('/')) {
return pathname.replace(/\/$/, '-cn/');
}
return pathname + '-cn';
}
// 兼容旧的 URL, `?locale=...`
var queryString = location.search;
if (queryString) {
var isZhCNConfig = queryString.indexOf('zh-CN') > -1;
2017-02-22 14:26:48 +08:00
if (isZhCNConfig & & !isZhCN(pathname)) {
2017-02-10 12:12:13 +08:00
location.pathname = getLocalizedPathname(pathname, isZhCNConfig)
}
}
// 首页无视链接里面的语言设置 https://github.com/ant-design/ant-design/issues/4552
2017-02-21 13:36:17 +08:00
if (isLocalStorageNameSupported() & & (pathname === '/' || pathname === '/index-cn')) {
2017-03-10 10:06:27 +08:00
var lang = (window.localStorage & & localStorage.getItem('locale')) || (navigator.language.toLowerCase() === 'zh-cn' ? 'zh-CN' : 'en-US');
// safari is 'zh-cn', while other browser is 'zh-CN';
2017-02-10 12:12:13 +08:00
if ((lang === 'zh-CN') !== isZhCN(pathname)) {
location.pathname = getLocalizedPathname(pathname, lang === 'zh-CN');
}
}
2017-02-22 14:26:48 +08:00
document.documentElement.className += isZhCN(pathname) ? 'zh-cn' : 'en-us';
2017-02-10 12:12:13 +08:00
})()
< / script >
2016-12-09 14:14:31 +08:00
< link rel = "icon" href = "https://t.alipayobjects.com/images/T1QUBfXo4fXXXXXXXX.png" type = "image/x-icon" >
< link rel = "stylesheet" type = "text/css" href = "https://fonts.googleapis.cnpmjs.org/css?family=Lato:400,700|Raleway" / >
2017-03-29 15:31:01 +08:00
< link rel = "stylesheet" type = "text/css" href = "{{ root }}index-1.css" / >
< link rel = "stylesheet" type = "text/css" href = "{{ root }}index-2.css" / >
2017-09-18 17:31:48 +08:00
< link rel = "stylesheet/less" type = "text/css" href = "{{ root }}color.less" / >
2016-12-09 14:24:38 +08:00
< style id = "nprogress-style" >
#nprogress { display: none }
< / style >
2016-12-09 14:14:31 +08:00
<!-- [if lte IE 10]>
< script
src="https://as.alipayobjects.com/g/component/??console-polyfill/0.2.2/index.js,media-match/2.0.2/media.match.min.js">< / script >
<![endif]-->
< script >
2016-09-08 20:38:08 +08:00
if (!window.Intl) {
document.writeln('< script src = "https://as.alipayobjects.com/g/component/intl/1.0.1/??Intl.js,locale-data/jsonp/en.js,locale-data/jsonp/zh.js" > ' + ' < ' + ' / s c r i p t > ' ) ;
}
if (!window.Promise) {
document.writeln('< script src = "https://as.alipayobjects.com/g/component/es6-promise/3.2.2/es6-promise.min.js" ' + ' > ' + ' < ' + ' / ' + ' s c r i p t > ' ) ;
2016-06-12 21:34:37 +08:00
}
2017-01-07 23:30:33 +08:00
// Enable Google Analytics
if (!location.port) {
/* eslint-disable */
(function (i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r;
i[r] = i[r] || function () {
(i[r].q = i[r].q || []).push(arguments)
}, i[r].l = 1 * new Date();
a = s.createElement(o),
m = s.getElementsByTagName(o)[0];
a.async = 1;
a.src = g;
m.parentNode.insertBefore(a, m)
})(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
ga('create', 'UA-72788897-1', 'auto');
ga('send', 'pageview');
/* eslint-enable */
}
< / script >
2017-04-12 21:17:04 +08:00
<!-- Hotjar Tracking Code for ant.design -->
< script >
(function(h,o,t,j,a,r){
h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};
h._hjSettings={hjid:473408,hjsv:5};
a=o.getElementsByTagName('head')[0];
r=o.createElement('script');r.async=1;
r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;
a.appendChild(r);
})(window,document,'//static.hotjar.com/c/hotjar-','.js?sv=');
< / script >
2016-12-09 14:14:31 +08:00
< / head >
< body >
< div id = "react-content" >
{{ content | safe }}
< / div >
2017-09-20 14:57:48 +08:00
{% if not usePreact %}
{% if isDev %}
< script src = "https://as.alipayobjects.com/g/component/??react/15.6.1/react.js,react/15.6.1/react-dom.js" > < / script >
{% else %}
< script src = "https://as.alipayobjects.com/g/component/??react/15.6.1/react.min.js,react/15.6.1/react-dom.min.js" > < / script >
{% endif %}
{% endif %}
2016-12-09 14:14:31 +08:00
< script src = "{{ root }}common.js" > < / script >
< script src = "{{ root }}index.js" > < / script >
< / body >
2016-02-29 14:08:40 +08:00
< / html >