Skip to content

Commit

Permalink
refine ad
Browse files Browse the repository at this point in the history
  • Loading branch information
PanJiaChen committed Dec 8, 2020
1 parent 56355fa commit 3fbe7ef
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
7 changes: 6 additions & 1 deletion docs/.vuepress/theme/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</p>
</div>

<div style="border-top: 1px solid #eaecef; text-align: center">
<div v-if="isCN||isGitee" style="border-top: 1px solid #eaecef; text-align: center">
<h4>赞助商</h4>
<div style="display: flex;justify-content: space-around;width: 60%;margin: 0 auto;font-size: 14px;">
<div style="width: 300px">
Expand Down Expand Up @@ -62,12 +62,17 @@

<script>
import NavLink from '@default-theme/NavLink.vue'
import { isGitee } from './utils'
export default {
components: { NavLink },
computed: {
isCN() {
return this.$lang === 'zh-CN'
},
isGitee() {
return isGitee()
},
data() {
return this.$page.frontmatter
},
Expand Down
7 changes: 5 additions & 2 deletions docs/.vuepress/theme/Layout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<Sidebar :items="sidebarItems" @toggle-sidebar="toggleSidebar">
<div slot="top" :class="{'load-success':loadSuccess}">
<div v-if="!isHome" id="codefund" :key="$route.path" />
<div class="sidebar-heading" style="color:auto;padding-top:8px;margin-bottom:-8px">
<div class="sidebar-heading" v-if="isCN||isGitee" style="color:auto;padding-top:8px;margin-bottom:-8px">
<span>赞助商</span>
<div>
<ul
Expand Down Expand Up @@ -92,7 +92,7 @@ import SWUpdatePopup from '@default-theme/SWUpdatePopup.vue'
import { resolveSidebarItems } from '@default-theme/util'
import Swal from 'sweetalert2'
import Home from './Home.vue'
import { loadGitter, loadCarbon } from './utils'
import { loadGitter, loadCarbon, isGitee } from './utils'
export default {
components: {
Expand Down Expand Up @@ -126,6 +126,9 @@ export default {
return path.includes('donate')
},
isGitee() {
return isGitee()
},
isCN() {
return this.$lang === 'zh-CN'
},
Expand Down

0 comments on commit 3fbe7ef

Please sign in to comment.