Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
icarusion committed Jun 4, 2018
1 parent 8095860 commit 29090b3
Show file tree
Hide file tree
Showing 12 changed files with 80 additions and 352 deletions.
4 changes: 1 addition & 3 deletions src/components/ad.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div v-if="lang === 'zh-CN'">
<div>
<!--<div class="advertisement" id="API">-->
<!--<row :gutter="32">-->
<!--<i-col span="12">-->
Expand Down Expand Up @@ -74,7 +74,6 @@
components: { adSend },
data () {
return {
lang: this.$lang,
ad_index: 1 // 随机广告索引,更好地显示一类广告
}
},
Expand All @@ -87,7 +86,6 @@
}
},
mounted () {
this.lang = this.$lang;
// 随机广告索引
this.ad_index = Math.floor(Math.random () * 2 + 1);
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
this.liveVisible = true;
}
if (this.liveVisible && this.$lang === 'zh-CN') {
if (this.liveVisible) {
// this.$Notice.config({
// top: 85
// });
Expand All @@ -75,7 +75,7 @@
// this.$Notice.config({
// top: 24
// });
} else if (this.liveVisible && this.$lang === 'en-US') {
} else if (this.liveVisible) {
// this.$Notice.config({
// top: 85
// });
Expand Down
90 changes: 37 additions & 53 deletions src/components/article.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@
<div class="catalogue" v-show="list.length">
<card dis-hover>
<div class="catalogue-title">
<template v-if="lang === 'zh-CN'">目录</template>
<template v-else>Catalogue</template>
<template>目录</template>
</div>
<div class="catalogue-content">
<ul>
Expand All @@ -38,7 +37,7 @@
</card>
</div>

<template v-if="lang === 'zh-CN'">
<template>
<div style="margin-top: 20px"></div>
<!--<a v-if="ad_index === 1" href="https://cn.udacity.com/course/intro-to-python-nanodegree-foundation&#45;&#45;nd000-cn-python/?utm_source=iviewui&utm_medium=banner&utm_campaign=python" target="_blank" @click="handleAsideAd('aside-udacity')" class="wrapper-aside wrapper-aside-no-padding">-->
<!--<img src="../images/aside-udacity-1.jpg">-->
Expand All @@ -55,27 +54,27 @@
<!--<a v-if="ad_index === 2" href="https://cn.udacity.com/fend/?utm_source=iviewui&utm_medium=banner&utm_campaign=fend" target="_blank" @click="handleAsideAd('aside-udacity')" class="wrapper-aside wrapper-aside-no-padding">-->
<!--<img src="../images/aside-udacity-5.jpg">-->
<!--</a>-->
<a v-if="ad_index === 1" href="http://t.cn/R3dhfIj" target="_blank" @click="handleAsideAd('aside-udacity')" class="wrapper-aside wrapper-aside-no-padding">
<img src="../images/aside-u-1.png">
</a>
<a v-if="ad_index === 2" href="http://t.cn/R3dhfIj" target="_blank" @click="handleAsideAd('aside-udacity')" class="wrapper-aside wrapper-aside-no-padding">
<img src="../images/aside-u-2.png">
</a>
<a v-if="ad_index === 3" href="http://t.cn/R3dhfIj" target="_blank" @click="handleAsideAd('aside-udacity')" class="wrapper-aside wrapper-aside-no-padding">
<img src="../images/aside-u-3.png">
</a>
<a v-if="ad_index === 4" href="http://t.cn/R3dhfIj" target="_blank" @click="handleAsideAd('aside-udacity')" class="wrapper-aside wrapper-aside-no-padding">
<img src="../images/aside-u-4.png">
</a>
<a v-if="ad_index === 5" href="http://t.cn/R3dhfIj" target="_blank" @click="handleAsideAd('aside-udacity')" class="wrapper-aside wrapper-aside-no-padding">
<img src="../images/aside-u-5.png">
</a>
<a v-if="ad_index === 6" href="https://cn.udacity.com/fend/?utm_source=iviewui&utm_medium=banner&utm_campaign=fend" target="_blank" @click="handleAsideAd('aside-udacity')" class="wrapper-aside wrapper-aside-no-padding">
<img src="../images/aside-udacity-5.jpg">
</a>
<a href="https://segmentfault.com/ls/1650000011074057" target="_blank" @click="handleAsideAd('aside-iview-live')" class="wrapper-aside">
<img src="../images/aside-iview-live.png">
</a>
<!--<a v-if="ad_index === 1" href="http://t.cn/R3dhfIj" target="_blank" @click="handleAsideAd('aside-udacity')" class="wrapper-aside wrapper-aside-no-padding">-->
<!--<img src="../images/aside-u-1.png">-->
<!--</a>-->
<!--<a v-if="ad_index === 2" href="http://t.cn/R3dhfIj" target="_blank" @click="handleAsideAd('aside-udacity')" class="wrapper-aside wrapper-aside-no-padding">-->
<!--<img src="../images/aside-u-2.png">-->
<!--</a>-->
<!--<a v-if="ad_index === 3" href="http://t.cn/R3dhfIj" target="_blank" @click="handleAsideAd('aside-udacity')" class="wrapper-aside wrapper-aside-no-padding">-->
<!--<img src="../images/aside-u-3.png">-->
<!--</a>-->
<!--<a v-if="ad_index === 4" href="http://t.cn/R3dhfIj" target="_blank" @click="handleAsideAd('aside-udacity')" class="wrapper-aside wrapper-aside-no-padding">-->
<!--<img src="../images/aside-u-4.png">-->
<!--</a>-->
<!--<a v-if="ad_index === 5" href="http://t.cn/R3dhfIj" target="_blank" @click="handleAsideAd('aside-udacity')" class="wrapper-aside wrapper-aside-no-padding">-->
<!--<img src="../images/aside-u-5.png">-->
<!--</a>-->
<!--<a v-if="ad_index === 6" href="https://cn.udacity.com/fend/?utm_source=iviewui&utm_medium=banner&utm_campaign=fend" target="_blank" @click="handleAsideAd('aside-udacity')" class="wrapper-aside wrapper-aside-no-padding">-->
<!--<img src="../images/aside-udacity-5.jpg">-->
<!--</a>-->
<!--<a href="https://segmentfault.com/ls/1650000011074057" target="_blank" @click="handleAsideAd('aside-iview-live')" class="wrapper-aside">-->
<!--<img src="../images/aside-iview-live.png">-->
<!--</a>-->
<!--<a href="https://www.mysubmail.com/sms?from=iview" target="_blank" @click="handleAsideAd('aside-submail')" class="wrapper-aside wrapper-aside-no-padding">-->
<!--<img src="../images/aside-submail3.jpg">-->
<!--</a>-->
Expand All @@ -101,59 +100,53 @@
<a href="https://github.com/iview/iview" target="_blank">iView</a>
</li>
<li>
<a href="https://github.com/iview/iview-cli" target="_blank">iView Cli</a>
</li>
<li>
<a href="https://github.com/iview/iview-admin" target="_blank">iView Admin</a>
<a href="https://github.com/TalkingData/iview-weapp" target="_blank">iView Weapp</a>
</li>
<li>
<a href="https://github.com/iview/iview-doc" target="_blank">iView Doc</a>
</li>
<li>
<a href="https://github.com/iview/iview-project" target="_blank">iView Project</a>
<a href="https://github.com/iview/weapp-doc" target="_blank">iView Weapp Doc</a>
</li>
</ul>
</i-col>
<i-col span="5">
<h4>
<Icon type="link"></Icon>
{{ $t('index.links') }}
相关站点
</h4>
<ul>
<li>
<a href="https://www.talkingdata.com/" target="_blank">TalkingData</a> - {{ $t('index.td') }}
<a href="https://www.talkingdata.com/" target="_blank">TalkingData</a> - 用数据的心智去超越
</li>
<li>
<a href="http://mi.talkingdata.com/" target="_blank">Marketing Intelligence</a> - {{ $t('index.td_mi') }}
<a href="http://mi.talkingdata.com/" target="_blank">Marketing Intelligence</a> - 免费公开大数据查询平台
</li>
<li>
<a href="https://github.com/TalkingData/inmap/" target="_blank">inMap</a> - {{ $t('index.inmap') }}
<a href="https://github.com/TalkingData/inmap/" target="_blank">inMap</a> - 大数据地理信息可视化框架
</li>
<li>
<a href="https://github.com/TalkingData/Fregata" target="_blank">Fregata</a> - {{ $t('index.Fregata') }}
<a href="https://github.com/TalkingData/Fregata" target="_blank">Fregata</a> - 大规模机器学习算法库
</li>
<li>
<a href="https://github.com/TalkingData/Myna" target="_blank">Myna</a> - {{ $t('index.Myna') }}
<a href="https://github.com/TalkingData/Myna" target="_blank">Myna</a> - Android 平台情景感知框架
</li>
<li>
<a href="https://github.com/TalkingData/owl" target="_blank">OWL</a> - {{ $t('index.OWL') }}
<a href="https://github.com/TalkingData/owl" target="_blank">OWL</a> - 分布式监控系统
</li>
</ul>
</i-col>
<i-col span="5" offset="2">
<h4>
<Icon type="chatbubbles"></Icon>
{{ $t('index.community') }}
社区
</h4>
<ul>
<li>
<a href="https://github.com/iview/iview/issues" target="_blank">{{ $t('index.feedback') }}</a>
<a href="https://github.com/TalkingData/weapp/issues" target="_blank">反馈建议</a>
</li>
<li>
<a href="https://www.iviewui.com/new-issue" target="_blank">{{ $t('index.bug') }}</a>
<a href="https://www.iviewui.com/new-issue" target="_blank">提交bug</a>
</li>
<li>
<a href="https://gitter.im/iview/iview" target="_blank">{{ $t('index.chat') }}</a>
<a href="https://gitter.im/iview/iview" target="_blank">在线讨论</a>
</li>
<li>
<a href="https://segmentfault.com/t/iview" target="_blank">SegmentFault</a>
Expand All @@ -163,12 +156,7 @@
<i-col span="5" offset="2">
<div class="footer-aside">
<div class="footer-logo">
<img src="../images/logo.png">
</div>
<div class="footer-author">
<a href="https://www.talkingdata.com/">
<img src="../images/logo-td.png">
</a>
<img src="../images/logo-footer.png">
</div>
<!--<div class="footer-version">-->
<!--<p>{{ $t('index.current_version') }}</p>-->
Expand Down Expand Up @@ -263,7 +251,6 @@
donate: false,
ask: false,
activeKey: '',
lang: this.$lang,
adCarousel: 0,
ad_index: this.app.ad_index
}
Expand Down Expand Up @@ -322,9 +309,6 @@
}
}
},
created () {
this.lang = this.$lang;
},
mounted () {
this.updateActiveNav();
Expand Down
13 changes: 4 additions & 9 deletions src/components/code.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,17 @@
<div>
<pre :class="{bg: bg}"><code :class="language" ref="code"><slot></slot></code></pre>
<span class="open-fiddle" v-if="title !== 'Code'" @click="openFiddle">
<Tooltip :content="$t('index.code_jsfiddle')" placement="top" transfer>
<Tooltip content="在 JSFiddle 中打开" placement="top" transfer>
<Icon type="code" size="18" />
</Tooltip>
</span>
<span class="scale" @click="scale">
<Tooltip :content="$t('index.code_fullscreen')" placement="top" transfer>
<Tooltip content="放大" placement="top" transfer>
<Icon type="qr-scanner" size="18"></Icon>
</Tooltip>
</span>
<span class="copy" @click="clip">
<Tooltip :content="$t('index.code_copy')" placement="top" transfer>
<Tooltip content="复制代码" placement="top" transfer>
<Icon type="clipboard" size="18" v-show="!copied"></Icon>
<Icon type="checkmark" size="18" v-show="copied" style="color:#5cb85c"></Icon>
</Tooltip>
Expand Down Expand Up @@ -87,7 +87,6 @@
openScale: false,
code: '',
copied: false,
docLang: this.$lang,
title: 'Code'
}
},
Expand Down Expand Up @@ -126,11 +125,7 @@
e.clearSelection();
clipboard.destroy();
this.copied = true;
if (this.docLang === 'zh-CN') {
this.$Message.success('代码已复制到剪贴板');
} else {
this.$Message.success('Code copied');
}
this.$Message.success('代码已复制到剪贴板');
setTimeout(() => {
this.copied = false;
}, 2000);
Expand Down
Loading

0 comments on commit 29090b3

Please sign in to comment.