update site
parent
d41c7dbbcd
commit
f05387d372
|
@ -7,6 +7,7 @@ import Sponsors from './sponsors';
|
|||
import zhCN from 'antd/locale-provider/zh_CN';
|
||||
import enUS from 'antd/locale-provider/default';
|
||||
import sortBy from 'lodash/sortBy';
|
||||
import axios from 'axios';
|
||||
import { isZhCN } from '../util';
|
||||
import { Provider, create } from '../../components/_util/store';
|
||||
import NProgress from 'nprogress';
|
||||
|
@ -156,13 +157,22 @@ export default {
|
|||
NProgress.done();
|
||||
document.documentElement.scrollTop = 0;
|
||||
try {
|
||||
document.getElementById('ad').innerHTML = '';
|
||||
const src = '//cdn.carbonads.com/carbon.js?serve=CK7DL2JW&placement=vuecomponentgithubio';
|
||||
const hm = document.createElement('script');
|
||||
hm.src = src;
|
||||
hm.id = '_carbonads_js';
|
||||
const s = document.getElementById('ad');
|
||||
s.append(hm);
|
||||
const isGithub = location.host.indexOf('github') !== -1;
|
||||
if(isGithub){
|
||||
document.getElementById('ad').innerHTML = '';
|
||||
const src = '//cdn.carbonads.com/carbon.js?serve=CK7DL2JW&placement=vuecomponentgithubio';
|
||||
const hm = document.createElement('script');
|
||||
hm.src = src;
|
||||
hm.id = '_carbonads_js';
|
||||
const s = document.getElementById('ad');
|
||||
s.append(hm);
|
||||
} else {
|
||||
axios.get('https://api.codefund.app/properties/162/funder.html?template=square')
|
||||
.then(function (response) {
|
||||
document.getElementById("codefund").innerHTML = response.data;
|
||||
});
|
||||
}
|
||||
|
||||
} catch (error) {}
|
||||
},
|
||||
},
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
}
|
||||
</style>
|
||||
<style>
|
||||
#ad {
|
||||
#ad, #codefund {
|
||||
width: 145px;
|
||||
position: fixed;
|
||||
bottom: 10px;
|
||||
|
@ -28,16 +28,24 @@
|
|||
font-size: 13px;
|
||||
font-family: "Source Sans Pro", "Helvetica Neue", Arial, sans-serif;
|
||||
}
|
||||
#ad a {
|
||||
#ad a, #codefund a {
|
||||
display: inline-block;
|
||||
color: #7f8c8d;
|
||||
font-weight: normal;
|
||||
}
|
||||
#codefund a {
|
||||
color: #7f8c8d !important;
|
||||
font-weight: normal !important;
|
||||
}
|
||||
#ad span {
|
||||
color: #7f8c8d;
|
||||
display: inline-block;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
#codefund #cf {
|
||||
margin-bottom: 0px!important;
|
||||
border-radius: 0px!important;
|
||||
}
|
||||
#ad img {
|
||||
width: 125px;
|
||||
}
|
||||
|
@ -48,9 +56,21 @@
|
|||
font-weight: normal;
|
||||
color: #34495e;
|
||||
}
|
||||
#ad .carbon-poweredby {
|
||||
color: #aaa;
|
||||
font-weight: normal;
|
||||
#ad .carbon-text,
|
||||
#codefund .cf-text {
|
||||
display: -webkit-box!important;
|
||||
-webkit-box-orient: vertical!important;
|
||||
-webkit-line-clamp: 4!important;
|
||||
overflow: hidden!important;
|
||||
}
|
||||
#codefund .cf-text {
|
||||
padding-bottom: 5px !important;
|
||||
font-size: 12px !important;
|
||||
}
|
||||
#ad .carbon-poweredby, #codefund .cf-powered-by {
|
||||
color: #aaa !important;
|
||||
font-weight: normal !important;
|
||||
line-height: 1.2 !important;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
|
@ -74,6 +94,7 @@
|
|||
<div id="ad">
|
||||
<!-- <script async type="text/javascript" src="//cdn.carbonads.com/carbon.js?serve=CK7DL2JW&placement=vuecomponentgithubio" id="_carbonads_js"></script> -->
|
||||
</div>
|
||||
<div id="codefund"></div>
|
||||
<script>
|
||||
// var SeedAndDewConfig = {};
|
||||
// (function() {
|
||||
|
|
|
@ -7,6 +7,7 @@ import Vue from 'vue';
|
|||
import VueI18n from 'vue-i18n';
|
||||
import VueRouter from 'vue-router';
|
||||
import VueClipboard from 'vue-clipboard2';
|
||||
import NProgress from 'nprogress';
|
||||
import routes from './routes';
|
||||
import Md from './components/md';
|
||||
import Api from './components/api';
|
||||
|
@ -49,6 +50,10 @@ const router = new VueRouter({
|
|||
fallback: false,
|
||||
routes,
|
||||
});
|
||||
router.beforeEach((to, from, next) => {
|
||||
NProgress.start();
|
||||
next();
|
||||
});
|
||||
new Vue({
|
||||
el: '#app',
|
||||
i18n,
|
||||
|
|
|
@ -1,12 +1,7 @@
|
|||
import Layout from './components/layout.vue';
|
||||
import Iframe from './components/iframe.vue';
|
||||
import demoRoutes from './demoRoutes';
|
||||
import NProgress from 'nprogress';
|
||||
|
||||
const beforeEnter = (to, from, next) => {
|
||||
NProgress.start();
|
||||
next();
|
||||
};
|
||||
export default [
|
||||
{
|
||||
path: '/ant-design-vue/components',
|
||||
|
@ -15,10 +10,7 @@ export default [
|
|||
const name = route.path.split('/ant-design-vue/components/')[1].split('/')[0];
|
||||
return { name, showDemo: true };
|
||||
},
|
||||
children: demoRoutes.map(item => ({
|
||||
...item,
|
||||
beforeEnter,
|
||||
})),
|
||||
children: demoRoutes,
|
||||
},
|
||||
{
|
||||
path: '/ant-design-vue/iframe',
|
||||
|
@ -42,92 +34,74 @@ export default [
|
|||
{
|
||||
path: 'docs/vue/customize-theme',
|
||||
component: () => import('../docs/vue/customize-theme.en-US.md'),
|
||||
beforeEnter,
|
||||
},
|
||||
{
|
||||
path: 'docs/vue/customize-theme-cn',
|
||||
component: () => import('../docs/vue/customize-theme.zh-CN.md'),
|
||||
beforeEnter,
|
||||
},
|
||||
{
|
||||
path: 'docs/vue/getting-started',
|
||||
component: () => import('../docs/vue/getting-started.en-US.md'),
|
||||
beforeEnter,
|
||||
},
|
||||
{
|
||||
path: 'docs/vue/getting-started-cn',
|
||||
component: () => import('../docs/vue/getting-started.zh-CN.md'),
|
||||
beforeEnter,
|
||||
},
|
||||
{
|
||||
path: 'docs/vue/i18n',
|
||||
component: () => import('../docs/vue/i18n.en-US.md'),
|
||||
beforeEnter,
|
||||
},
|
||||
{
|
||||
path: 'docs/vue/i18n-cn',
|
||||
component: () => import('../docs/vue/i18n.zh-CN.md'),
|
||||
beforeEnter,
|
||||
},
|
||||
{
|
||||
path: 'docs/vue/introduce',
|
||||
component: () => import('../docs/vue/introduce.en-US.md'),
|
||||
beforeEnter,
|
||||
},
|
||||
{
|
||||
path: 'docs/vue/introduce-cn',
|
||||
component: () => import('../docs/vue/introduce.zh-CN.md'),
|
||||
beforeEnter,
|
||||
},
|
||||
{
|
||||
path: 'docs/vue/use-with-vue-cli',
|
||||
component: () => import('../docs/vue/use-with-vue-cli.en-US.md'),
|
||||
beforeEnter,
|
||||
},
|
||||
{
|
||||
path: 'docs/vue/use-with-vue-cli-cn',
|
||||
component: () => import('../docs/vue/use-with-vue-cli.zh-CN.md'),
|
||||
beforeEnter,
|
||||
},
|
||||
{
|
||||
path: 'docs/vue/faq',
|
||||
component: () => import('../docs/vue/faq.en-US.md'),
|
||||
beforeEnter,
|
||||
},
|
||||
{
|
||||
path: 'docs/vue/faq-cn',
|
||||
component: () => import('../docs/vue/faq.zh-CN.md'),
|
||||
beforeEnter,
|
||||
},
|
||||
{
|
||||
path: 'docs/vue/download',
|
||||
component: () => import('../docs/vue/download.en-US.md'),
|
||||
beforeEnter,
|
||||
},
|
||||
{
|
||||
path: 'docs/vue/download-cn',
|
||||
component: () => import('../docs/vue/download.zh-CN.md'),
|
||||
beforeEnter,
|
||||
},
|
||||
{
|
||||
path: 'docs/vue/sponsor',
|
||||
component: () => import('../docs/vue/sponsor.en-US.md'),
|
||||
beforeEnter,
|
||||
},
|
||||
{
|
||||
path: 'docs/vue/sponsor-cn',
|
||||
component: () => import('../docs/vue/sponsor.zh-CN.md'),
|
||||
beforeEnter,
|
||||
},
|
||||
{
|
||||
path: 'docs/vue/changelog',
|
||||
component: () => import('../CHANGELOG.en-US.md'),
|
||||
beforeEnter,
|
||||
},
|
||||
{
|
||||
path: 'docs/vue/changelog-cn',
|
||||
component: () => import('../CHANGELOG.zh-CN.md'),
|
||||
beforeEnter,
|
||||
},
|
||||
{ path: '', redirect: '/ant-design-vue/vue/docs/introduce/' },
|
||||
],
|
||||
|
|
Loading…
Reference in New Issue