This commit is contained in:
huanqing.shao
2019-11-03 21:51:07 +08:00
parent a7ffaa1f8d
commit c7ca6dc076
14 changed files with 168 additions and 97 deletions

View File

@ -9,9 +9,9 @@
data-ad-format="auto"
data-full-width-responsive="true"></ins>
<script>
if (!window.kuboardSharing) {
<!-- if (!window.kuboardSharing) { -->
(adsbygoogle = window.adsbygoogle || []).push({});
}
<!-- } -->
</script>
</div>
</template>

View File

@ -9,9 +9,9 @@
data-ad-format="auto"
data-full-width-responsive="true"></ins>
<script>
if (!window.kuboardSharing) {
<!-- if (!window.kuboardSharing) { -->
(adsbygoogle = window.adsbygoogle || []).push({});
}
<!-- } -->
</script>
</div>
</template>

View File

@ -1,19 +1,21 @@
<template>
<div v-if="$themeConfig.showAds" :style="$isDev ? 'background-color: grey;' : ''">
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- 正方形-正文 -->
<ins class="adsbygoogle"
style="display:block"
data-ad-client="ca-pub-3313149841665250"
data-ad-slot="9455695764"
data-ad-format="auto"
data-full-width-responsive="true"></ins>
<script>
if (!window.kuboardSharing) {
(adsbygoogle = window.adsbygoogle || []).push({});
}
</script>
</div>
<LazyLoad :noAdsOnSharing="true">
<div v-if="$themeConfig.showAds" :style="$isDev ? 'background-color: grey;' : ''">
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- 正方形-正文 -->
<ins class="adsbygoogle"
style="display:block"
data-ad-client="ca-pub-3313149841665250"
data-ad-slot="9455695764"
data-ad-format="auto"
data-full-width-responsive="true"></ins>
<script>
if (!window.kuboardSharing) {
(adsbygoogle = window.adsbygoogle || []).push({});
}
</script>
</div>
</LazyLoad>
</template>
<script>

View File

@ -1,19 +1,21 @@
<template>
<div v-if="$themeConfig.showAds" :style="$isDev ? 'background-color: grey;' : ''">
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- 正文-垂直 -->
<ins class="adsbygoogle"
style="display:block"
data-ad-client="ca-pub-3313149841665250"
data-ad-slot="4549679988"
data-ad-format="auto"
data-full-width-responsive="true"></ins>
<script>
if (!window.kuboardSharing) {
(adsbygoogle = window.adsbygoogle || []).push({});
}
</script>
</div>
<LazyLoad :noAdsOnSharing="true">
<div v-if="$themeConfig.showAds" :style="$isDev ? 'background-color: grey;' : ''">
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- 正文-垂直 -->
<ins class="adsbygoogle"
style="display:block"
data-ad-client="ca-pub-3313149841665250"
data-ad-slot="4549679988"
data-ad-format="auto"
data-full-width-responsive="true"></ins>
<script>
if (!window.kuboardSharing) {
(adsbygoogle = window.adsbygoogle || []).push({});
}
</script>
</div>
</LazyLoad>
</template>
<script>

View File

@ -0,0 +1,42 @@
<template>
<div v-if="load">
<slot></slot>
</div>
</template>
<script>
export default {
props: {
noAdsOnSharing: { type: Boolean, required: false, default: false }
},
data () {
let load = false
return {
load: load
}
},
mounted () {
setTimeout( _ => {
if (this.noAdsOnSharing) {
console.log('noAdsOnSharing')
if (typeof window !== 'undefined') {
if (this.$isSharing) {
this.load = false
console.log('noAdsOnSharing', this.load)
} else {
this.load = true
console.log('noAdsOnSharing', this.load)
}
}
} else {
this.load = true
console.log('load', this.load)
}
}, 1000)
}
}
</script>
<style>
</style>

View File

@ -1,29 +1,31 @@
<template>
<div>
<div v-for="(item, key) in vssues" :key="key">
<Vssue v-if="item && item > 0" v-show="key === $route.path" :issueId="item" :options="options"/>
<div v-if="item === undefined && isLocalHost" v-show="key === $route.path" :key="key">
<b-button variant="danger" @click="vssues[key] = ''">请创建 VssueId</b-button>
<LazyLoad>
<div v-for="(item, key) in vssues" :key="key">
<Vssue v-if="item && item > 0" v-show="key === $route.path" :issueId="item" :options="options"/>
<div v-if="item === undefined && isLocalHost" v-show="key === $route.path" :key="key">
<b-button variant="danger" @click="vssues[key] = ''">请创建 VssueId</b-button>
</div>
<div v-if="item === ''">
<b-button variant="warning" @click="refreshId = $refs.vssue[0].vssue.issue.id">请填写 vusseId <span v-if="refreshId"> - {{refreshId}}</span></b-button>
<Vssue ref="vssue" :title="$page.path" :options="options"/>
</div>
</div>
<div v-if="item === ''">
<b-button variant="warning" @click="refreshId = $refs.vssue[0].vssue.issue.id">请填写 vusseId <span v-if="refreshId"> - {{refreshId}}</span></b-button>
<Vssue ref="vssue" :title="$page.path" :options="options"/>
</div>
</div>
<script type="text/javascript">
(function(){
var bp = document.createElement('script');
var curProtocol = window.location.protocol.split(':')[0];
if (curProtocol === 'https') {
bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
}
else {
bp.src = 'http://push.zhanzhang.baidu.com/push.js';
}
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(bp, s);
})();
</script>
<script type="text/javascript">
(function(){
var bp = document.createElement('script');
var curProtocol = window.location.protocol.split(':')[0];
if (curProtocol === 'https') {
bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
}
else {
bp.src = 'http://push.zhanzhang.baidu.com/push.js';
}
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(bp, s);
})();
</script>
</LazyLoad>
</div>
</template>

View File

@ -1,7 +1,11 @@
<template>
<a aria-label="github" @click="$sendGaEvent('ViewGitHubStar', 'ViewGitHubStarNav', 'ViweGitHubStar:' + $page.path)">
<iframe style="display:inline-block;vertical-align:middle;" src="https://ghbtns.com/github-btn.html?user=eip-work&amp;repo=kuboard-press&amp;type=star&amp;count=true&amp;size=small" frameborder="0" scrolling="0" width="100px" height="20px"></iframe>
</a>
<div style="display: inline-block; width: 100px;">
<LazyLoad>
<a aria-label="github" @click="$sendGaEvent('ViewGitHubStar', 'ViewGitHubStarNav', 'ViweGitHubStar:' + $page.path)">
<iframe style="display:inline-block;vertical-align:middle;" src="https://ghbtns.com/github-btn.html?user=eip-work&amp;repo=kuboard-press&amp;type=star&amp;count=true&amp;size=small" frameborder="0" scrolling="0" width="100px" height="20px"></iframe>
</a>
</LazyLoad>
</div>
</template>
<script>