sharing
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div :style="$isDev ? 'background-color: #grey;' : ''" v-if="!$frontmatter.lessAds && $themeConfig.showAds">
|
||||
<div class="ads" v-if="!$frontmatter.isSharing">
|
||||
<div :style="$isDev ? 'background-color: #grey;' : ''">
|
||||
<div class="ads" v-if="!$frontmatter.lessAds && $themeConfig.showAds && !isSharing">
|
||||
<div>
|
||||
<a @click="clickAds" :href="random.url" target="_blank" rel="nofollow" style="text-decoration: none;">
|
||||
<span class="name">
|
||||
@ -39,7 +39,15 @@
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
ads: require('./ad-list')
|
||||
ads: require('./ad-list'),
|
||||
isSharing: false
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
if (typeof window !== 'undefined') {
|
||||
if (location.search !== undefined && location.search.indexOf('sharing') >= 0) {
|
||||
this.isSharing = true
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
||||
@ -30,7 +30,11 @@
|
||||
|
||||
<Content class="theme-default-content" style="padding-top: 0; margin-top: -3rem; padding-bottom: 1rem;"/>
|
||||
<div class="page-nav" style="max-width: 1000px; padding-top:0; margin-top: 1rem;" v-if="$frontmatter.isSharing">
|
||||
Kuboard - 快速在 Kubernetes 上落地微服务
|
||||
<p style="text-align: center;">
|
||||
<a href="/">
|
||||
<img src="/images/logo-main.png" style="margin: auto;">
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
<JoinCommunity></JoinCommunity>
|
||||
<PageEdit style="max-width: 1000px;"/>
|
||||
@ -57,7 +61,8 @@ export default {
|
||||
mounted () {
|
||||
if (typeof window !== 'undefined') {
|
||||
if (location.search !== undefined && location.search.indexOf('sharing') >= 0) {
|
||||
this.$frontmatter.isSharing = true
|
||||
// 如果带参数 sharing,则设置 $frontmatter.isSharing = true
|
||||
this.$set(this.$frontmatter, 'isSharing', true)
|
||||
document.title = this.$frontmatter.sharingTitle || this.$page.title
|
||||
this.$frontmatter.title = this.$frontmatter.sharingTitle
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user