Browse Source

doc: update doc

pull/1143/head
tangjinzhou 5 years ago
parent
commit
c539568b76
  1. 8
      site/components/CarbonAds.vue
  2. 14
      site/components/layout.vue
  3. 32
      site/components/sponsors.vue

8
site/components/CarbonAds.vue

@ -2,10 +2,10 @@
import axios from 'axios';
const carbonUrls = {
'www.antdv.com': '//cdn.carbonads.com/carbon.js?serve=CK7DL2JW&placement=antdvcom',
'tangjinzhou.gitee.io':
'//cdn.carbonads.com/carbon.js?serve=CK7DL2JN&placement=tangjinzhougiteeio',
'ant-design-vue.gitee.io':
'//cdn.carbonads.com/carbon.js?serve=CK7DL2JN&placement=antdesignvuegiteeio',
// 'tangjinzhou.gitee.io':
// '//cdn.carbonads.com/carbon.js?serve=CK7DL2JN&placement=tangjinzhougiteeio',
// 'ant-design-vue.gitee.io':
// '//cdn.carbonads.com/carbon.js?serve=CK7DL2JN&placement=antdesignvuegiteeio',
'vue.ant.design': '//cdn.carbonads.com/carbon.js?serve=CK7DL2JW&placement=vueantdesign',
};
const carbonUrl =

14
site/components/layout.vue

@ -28,6 +28,7 @@ const docsList = [
];
let isMobile = false;
const isGitee = window.location.host.indexOf('gitee.io') > -1;
enquireScreen(b => {
isMobile = b;
});
@ -74,6 +75,17 @@ export default {
}
},
mounted() {
if(isGitee) {
this.$info({
title: '提示',
content: '访问国内镜像站点的用户请访问 antdv.com 站点',
okText:'立即跳转',
onOk() {
location.href = 'https://www.antdv.com';
},
});
}
this.$nextTick(() => {
this.addSubMenu();
const nprogressHiddenStyle = document.getElementById('nprogress-style');
@ -263,7 +275,7 @@ export default {
>
<a-affix>
<section class="main-menu-inner">
<Sponsors title={isCN ? '赞助商' : 'Sponsors'} />
<Sponsors isCN={isCN} />
<a-menu
class="aside-container menu-site"
selectedKeys={[name]}

32
site/components/sponsors.vue

@ -2,7 +2,7 @@
<div class="snd-ad">
<div class="sponsorsWrap">
<span class="sponsorsTitle">
{{ title }}
{{ isCN ? '赞助商' : 'Sponsors' }}
</span>
<ul>
<li class="sponsorsItem">
@ -27,19 +27,39 @@
>
<img
height="66"
width="34"
src="https://qn.antdv.com/youkeda.jpeg"
alt="bmatch"
>
</a>
</li>
<li class="sponsorsItem">
<a-button
type="primary"
ghost
style="font-size: 12px"
@click="handleClick"
>
{{ isCN ? '成为赞助商':'Become a Sponsor' }}
</a-button>
</li>
</ul>
</div>
<a-modal
v-model="visible"
title="成为赞助商"
@ok="visible=false"
>
如果您有品牌推广活动推广招聘推广社区合作等需求欢迎联系我们成为赞助商<br>
您的广告将出现在 And Design Vue 文档所有子页面及 GitHub Readme 等页面<br>
咨询邮箱<a href="mailto:antdv@foxmail.com">antdv@foxmail.com</a><br>
</a-modal>
</div>
</template>
<script>
import moment from 'moment';
export default {
props: ['title'],
props: ['isCN'],
data() {
return {
top: 50,
@ -49,12 +69,20 @@ export default {
end: '2019-06-11',
},
},
visible: false,
};
},
methods: {
isEffective({start, end}){
return moment().isBetween(start, end);
},
handleClick() {
if(this.isCN) {
this.visible = true;
} else {
window.open('https://opencollective.com/ant-design-vue#sponsor');
}
},
},
};
</script>

Loading…
Cancel
Save