Skip to content

Commit 86c069c

Browse files
committed
docs: update new logo
1 parent 1871308 commit 86c069c

File tree

7 files changed

+113
-48
lines changed

7 files changed

+113
-48
lines changed

site/ant-design-vue.svg

Lines changed: 11 additions & 0 deletions
Loading

site/components/CarbonAds.vue

Lines changed: 32 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,19 @@ import axios from 'axios';
33
const carbonUrls = {
44
'vuecomponent.github.io': '//cdn.carbonads.com/carbon.js?serve=CK7DL2JW&placement=vuecomponentgithubio',
55
'tangjinzhou.gitee.io':'//cdn.carbonads.com/carbon.js?serve=CK7DL2JN&placement=tangjinzhougiteeio',
6+
'vue.ant.design': '//cdn.carbonads.com/carbon.js?serve=CK7DL2JW&placement=vuecomponentgithubio',
67
};
7-
const carbonUrl = '//cdn.carbonads.com/carbon.js?serve=CK7DL2JW&placement=vuecomponentgithubio' || carbonUrls[location.host];
8-
const isGitee = location.host.indexOf('gitee') !== -1;
8+
const carbonUrl = carbonUrls[location.host] || '//cdn.carbonads.com/carbon.js?serve=CK7DL2JW&placement=vuecomponentgithubio';
99
export default {
10+
props: {
11+
isMobile: Boolean,
12+
},
1013
watch: {
1114
$route(e, t) {
1215
let adId = '#carbonads';
13-
if(isGitee) {
14-
adId = '#cf';
15-
}
16+
// if(isGitee) {
17+
// adId = '#cf';
18+
// }
1619
if(e.path !== t.path && this.$el.querySelector(adId)){
1720
this.$el.innerHTML = "";
1821
this.load();
@@ -32,12 +35,13 @@ export default {
3235
},
3336
methods: {
3437
load() {
35-
if(isGitee) {
36-
axios.get('https://api.codefund.app/properties/162/funder.html?template=horizontal')
37-
.then(function (response) {
38-
document.getElementById("codefund-ads").innerHTML = response.data;
39-
});
40-
} else if(carbonUrl) {
38+
// if(isGitee) {
39+
// axios.get('https://api.codefund.app/properties/162/funder.html?template=horizontal')
40+
// .then(function (response) {
41+
// document.getElementById("codefund-ads").innerHTML = response.data;
42+
// });
43+
// } else
44+
if(carbonUrl) {
4145
const e = document.createElement("script");
4246
e.id = "_carbonads_js";
4347
e.src = carbonUrl;
@@ -47,13 +51,14 @@ export default {
4751
},
4852
render () {
4953
return (
50-
isGitee ? <div id="codefund-ads"/> : <div id="carbon-ads"/>
54+
<div id="carbon-ads" class={this.isMobile ? 'carbon-mobile':''}/>
5155
);
5256
},
5357
};
5458
</script>
55-
<style>
59+
<style lang="less">
5660
#carbon-ads {
61+
overflow: hidden;
5762
width: 145px;
5863
position: fixed;
5964
z-index: 9;
@@ -63,6 +68,7 @@ export default {
6368
background-color: #fff;
6469
border-radius: 3px;
6570
font-size: 13px;
71+
background: #f5f5f5;
6672
font-family: "Source Sans Pro", "Helvetica Neue", Arial, sans-serif;
6773
}
6874
#carbon-ads a {
@@ -72,20 +78,18 @@ export default {
7278
}
7379
#carbon-ads span {
7480
color: #7f8c8d;
75-
display: inline-block;
76-
margin-bottom: 5px;
7781
}
7882
#carbon-ads img {
7983
width: 125px;
8084
}
8185
#carbon-ads .carbon-img,
8286
#carbon-ads .carbon-text {
8387
display: block;
84-
margin-bottom: 6px;
8588
font-weight: normal;
8689
color: #34495e;
8790
}
8891
#carbon-ads .carbon-text {
92+
margin-top: 6px;
8993
display: -webkit-box;
9094
-webkit-box-orient: vertical;
9195
-webkit-line-clamp: 4;
@@ -95,5 +99,17 @@ export default {
9599
color: #aaa ;
96100
font-weight: normal ;
97101
line-height: 1.2 ;
102+
margin-top: 6px;
103+
}
104+
#carbon-ads.carbon-mobile {
105+
width: 100%;
106+
position: relative;
107+
right: 0;
108+
bottom: 0;
109+
padding: 0;
110+
.carbon-img {
111+
float: left;
112+
margin-right: 10px;
113+
}
98114
}
99115
</style>

site/components/header.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
import { isZhCN } from '../util';
33
import sortBy from 'lodash/sortBy';
44
import packageInfo from '../../package.json';
5+
import logo from '../logo.svg';
6+
import antDesignVue from '../ant-design-vue.svg';
57
68
export default {
79
props: {
@@ -37,8 +39,8 @@ export default {
3739
<a-row>
3840
<a-col class='header-left' xxl={4} xl={5} lg={5} md={6} sm={24} xs={24}>
3941
<router-link to={{ path: '/ant-design-vue' }} id='logo'>
40-
<img alt='logo' height='32' src='https://cdn.nlark.com/yuque/0/2019/png/87084/1548485177381-assets/web-upload/d18a622f-08d8-4955-a5c2-38138f80177b.png' />
41-
<span style='color: black;font-size: 16px;font-weight: 400;'>Ant Design Vue</span>
42+
<img alt='logo' height='32' src={logo} />
43+
<img alt='logo' height='16' src={antDesignVue} />
4244
</router-link>
4345
<a-button ghost size='small' onClick={this.handleClick} class='header-lang-button' key='lang-button'>
4446
{isCN ? 'English' : '中文'}

site/components/layout.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ export default {
267267
}
268268
<a-col xxl={20} xl={19} lg={19} md={18} sm={24} xs={24}>
269269
<section class='main-container main-container-component'>
270-
<CarbonAds />
270+
<CarbonAds isMobile={isMobile}/>
271271
{!isMobile ? <div class='toc-affix' style='width: 120px;'>
272272
{this.getSubMenu(isCN)}
273273
</div> : null}

site/index.html

Lines changed: 32 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,38 @@
11
<!doctype html>
22
<html>
3+
34
<head>
4-
<meta charset="utf-8">
5-
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7-
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
8-
<meta http-equiv="Pragma" content="no-cache">
9-
<meta http-equiv="Expires" content="0">
10-
<meta name="description" content="An enterprise-class UI components based on Ant Design and Vue">
11-
<title>Ant Design Vue</title>
12-
<link rel="icon" type="image/x-icon" href="https://cdn.nlark.com/yuque/0/2019/png/87084/1548485177381-assets/web-upload/d18a622f-08d8-4955-a5c2-38138f80177b.png">
13-
<style id="nprogress-style">
14-
#nprogress {
15-
display: none;
16-
}
17-
</style>
18-
<script>
19-
var _hmt = _hmt || [];
20-
var isGithub = location.host.indexOf('github') !== -1;
21-
var src = isGithub ? 'https://hm.baidu.com/hm.js?b3ef688fa86bfb75027f1b410180a867' : 'https://hm.baidu.com/hm.js?1564b57c5b8f74933e4fedca9dc75b0d';
22-
(function() {
23-
var hm = document.createElement('script');
24-
hm.src = src;
25-
var s = document.getElementsByTagName('script')[0];
26-
s.parentNode.insertBefore(hm, s);
27-
})()
28-
</script>
5+
<meta charset="utf-8">
6+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
7+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
8+
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
9+
<meta http-equiv="Pragma" content="no-cache">
10+
<meta http-equiv="Expires" content="0">
11+
<meta name="description" content="An enterprise-class UI components based on Ant Design and Vue">
12+
<title>Ant Design Vue</title>
13+
<link rel="icon" type="image/x-icon" href="https://cdn.nlark.com/yuque/0/2019/png/87084/1550242977163-assets/web-upload/5bdc08bb-58a1-4312-8380-d43b1590154c.png">
14+
<style id="nprogress-style">
15+
#nprogress {
16+
display: none;
17+
}
18+
</style>
19+
<script>
20+
var _hmt = _hmt || [];
21+
var isGithub = location.host.indexOf('github') !== -1;
22+
var src = isGithub ? 'https://hm.baidu.com/hm.js?b3ef688fa86bfb75027f1b410180a867' : 'https://hm.baidu.com/hm.js?1564b57c5b8f74933e4fedca9dc75b0d';
23+
(function() {
24+
var hm = document.createElement('script');
25+
hm.src = src;
26+
var s = document.getElementsByTagName('script')[0];
27+
s.parentNode.insertBefore(hm, s);
28+
})()
29+
</script>
2930
</head>
31+
3032
<body>
31-
<div id="app">
32-
<router-view></router-view>
33-
</div>
33+
<div id="app">
34+
<router-view></router-view>
35+
</div>
3436
</body>
35-
</html>
37+
38+
</html>

site/index.less

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,3 +181,7 @@
181181
.toc-affix .ant-anchor-wrapper {
182182
max-height: calc(~'100vh - 350px') !important;
183183
}
184+
185+
.drawer-wrapper .drawer-content {
186+
-webkit-overflow-scrolling: touch;
187+
}

site/logo.svg

Lines changed: 29 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)