mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-24 05:05:20 -04:00
[ads] experiment
This commit is contained in:
parent
c62eee0d8a
commit
652d99953a
@ -1,12 +1,16 @@
|
||||
\<template>
|
||||
<div v-if="config.ads && config.ads.enabled && active"
|
||||
:class="[adPlaceholdersVisible ? 'ad-placeholder' : '']">
|
||||
<span v-if="adPlaceholdersVisible">{{phkey}} / {{adConfig.slotId}}</span>
|
||||
<template v-if="adPlaceholdersVisible">
|
||||
<p class="text-center h5">{{phkey}}</p>
|
||||
<Debug :v="adConfig"/>
|
||||
</template>
|
||||
<ins v-else class="adsbygoogle"
|
||||
style="display:block"
|
||||
data-ad-client="ca-pub-8518361481036191"
|
||||
:data-ad-slot="adConfig.slotId"
|
||||
:data-ad-format="adConfig.adFormat"
|
||||
:data-ad-layout="adConfig.adLayout"
|
||||
:data-full-width-responsive="adConfig.responsive ? 'true' : ''"></ins>
|
||||
</div>
|
||||
</template>
|
||||
@ -24,12 +28,13 @@ export default {
|
||||
return { active: false, adConfig: {} };
|
||||
}
|
||||
|
||||
const [slotId, adFormat, responsive] = adPlaceholders[this.phkey];
|
||||
const {slotId, adFormat, adLayout = null, responsive = false} = adPlaceholders[this.phkey];
|
||||
return {
|
||||
active: true,
|
||||
adConfig: {
|
||||
slotId,
|
||||
adFormat,
|
||||
adLayout,
|
||||
responsive,
|
||||
}
|
||||
}
|
||||
@ -50,8 +55,7 @@ export default {
|
||||
.ad-placeholder {
|
||||
background-color: #b2caec;
|
||||
width: 100%;
|
||||
height: 80px;
|
||||
height: 200px;
|
||||
padding: 1em;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
|
@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<Page>
|
||||
<UkraineBanner class="mb-4"/>
|
||||
<AdPlaceholder phkey="small-homepage"/>
|
||||
<template v-if="$te('home.welcome')">
|
||||
<section>
|
||||
<h2>
|
||||
|
@ -11,6 +11,8 @@
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<AdPlaceholder phkey="small-homepage"/>
|
||||
|
||||
<div class="position-relative">
|
||||
<div v-if="profile.sensitive.length && !contentWarningDismissed" class="content-warning text-center">
|
||||
<ContentWarning :warnings="profile.sensitive"
|
||||
|
@ -2,6 +2,7 @@
|
||||
<Page>
|
||||
<MustLogin v-if="!$user()"/>
|
||||
<div v-else>
|
||||
<AdPlaceholder phkey="small-homepage"/>
|
||||
<div class="mb-3 d-flex justify-content-between flex-column flex-md-row">
|
||||
<h2 class="text-nowrap">
|
||||
<Avatar :user="$user()"/>
|
||||
|
@ -1,23 +1,23 @@
|
||||
export default {
|
||||
'support': [2557549454, 'auto', true],
|
||||
'support': {slotId: 2557549454, adFormat: 'auto', responsive: true},
|
||||
|
||||
'aside-left-top': null,
|
||||
'aside-left-middle': [4999879969, 'auto', true],
|
||||
'aside-left-middle': {slotId: 4999879969, adFormat: 'auto', responsive: true},
|
||||
'aside-left-bottom': null,
|
||||
|
||||
'aside-right-top': null,
|
||||
'aside-right-middle': [2369847195, 'auto', true],
|
||||
'aside-right-bottom': [6664353412, 'auto', true],
|
||||
'aside-right-middle': {slotId: 8917042232, adFormat: 'autorelaxed'}, // prev: {slotId: 2369847195, adFormat: 'auto', responsive: true},
|
||||
'aside-right-bottom': {slotId: 6664353412, adFormat: 'auto', responsive: true},
|
||||
|
||||
'main-0': [8172838213, 'auto', true],
|
||||
'main-1': [3299823474, 'auto', true],
|
||||
'main-2': [3108251782, 'auto', true],
|
||||
'main-3': [6716873048, 'auto', true],
|
||||
'main-0': {slotId: 3137058361, adFormat: 'auto', adLayout: 'in-article'}, // prev: {slotId: 8172838213, adFormat: 'auto', responsive: true},
|
||||
'main-1': {slotId: 3299823474, adFormat: 'auto', responsive: true},
|
||||
'main-2': {slotId: 3108251782, adFormat: 'auto', responsive: true},
|
||||
'main-3': {slotId: 6716873048, adFormat: 'auto', responsive: true},
|
||||
'main-4': null,
|
||||
'main-5': null,
|
||||
'main-6': null,
|
||||
|
||||
'footer': [6584462360, 'autorelaxed', false],
|
||||
'footer': {slotId: 6584462360, adFormat: 'autorelaxed'},
|
||||
|
||||
'small-homepage': [6146027401, 'auto', true],
|
||||
'small-homepage': {slotId: 6146027401, adFormat: 'auto', responsive: true},
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user