|
|
@ -1,18 +1,18 @@
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
|
<div class="bsa-cpc-wrapper">
|
|
|
|
<div class="buy-sell-ads">
|
|
|
|
<div class="bsa-cpc"></div>
|
|
|
|
<div class="bsa-cpc" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
|
<script setup lang="ts">
|
|
|
|
import { defineProps, onMounted } from 'vue'
|
|
|
|
import { defineProps, onMounted } from 'vue'
|
|
|
|
|
|
|
|
|
|
|
|
/* global _bsa */
|
|
|
|
// global _bsa
|
|
|
|
const ID = 'bsa-cpc-script'
|
|
|
|
const ID = 'bsa-cpc-script'
|
|
|
|
const { code, placement } = defineProps<{ code: string; placement: string }>()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
declare global {
|
|
|
|
declare global {
|
|
|
|
var _bsa: BSA | undefined
|
|
|
|
var _bsa: BSA | undefined
|
|
|
|
|
|
|
|
|
|
|
|
interface BSA {
|
|
|
|
interface BSA {
|
|
|
|
init(
|
|
|
|
init(
|
|
|
|
name: string,
|
|
|
|
name: string,
|
|
|
@ -27,99 +27,120 @@ declare global {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function load() {
|
|
|
|
const { code, placement } = defineProps<{
|
|
|
|
if (typeof _bsa !== 'undefined' && _bsa) {
|
|
|
|
code: string
|
|
|
|
_bsa.init('default', code, `placement:${placement}`, {
|
|
|
|
placement: string
|
|
|
|
target: '.bsa-cpc',
|
|
|
|
}>()
|
|
|
|
align: 'horizontal',
|
|
|
|
|
|
|
|
disable_css: 'true'
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
onMounted(() => {
|
|
|
|
if (!document.getElementById(ID)) {
|
|
|
|
if (!document.getElementById(ID)) {
|
|
|
|
const s = document.createElement('script')
|
|
|
|
const s = document.createElement('script')
|
|
|
|
|
|
|
|
|
|
|
|
s.id = ID
|
|
|
|
s.id = ID
|
|
|
|
s.src = `//m.servedby-buysellads.com/monetization.js`
|
|
|
|
s.src = '//m.servedby-buysellads.com/monetization.js'
|
|
|
|
|
|
|
|
|
|
|
|
document.head.appendChild(s)
|
|
|
|
document.head.appendChild(s)
|
|
|
|
s.onload = () => {
|
|
|
|
|
|
|
|
load()
|
|
|
|
s.onload = () => { load() }
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
load()
|
|
|
|
load()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<style>
|
|
|
|
function load() {
|
|
|
|
.bsa-cpc-wrapper {
|
|
|
|
if (typeof _bsa !== 'undefined' && _bsa) {
|
|
|
|
font-size: 0.95rem;
|
|
|
|
_bsa.init('default', code, `placement:${placement}`, {
|
|
|
|
/* from Page.vue */
|
|
|
|
target: '.bsa-cpc',
|
|
|
|
max-width: 50rem;
|
|
|
|
align: 'horizontal',
|
|
|
|
margin: 0px auto;
|
|
|
|
disable_css: 'true'
|
|
|
|
padding: 1rem 2rem 0;
|
|
|
|
})
|
|
|
|
margin-bottom: -1rem;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
@media (max-width: 419px) {
|
|
|
|
<style scoped>
|
|
|
|
.bsa-cpc-wrapper {
|
|
|
|
.buy-sell-ads {
|
|
|
|
padding: 0 1.5rem;
|
|
|
|
margin: 0 auto;
|
|
|
|
}
|
|
|
|
padding-top: 2rem;
|
|
|
|
|
|
|
|
font-size: .85rem;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.bsa-cpc {
|
|
|
|
.bsa-cpc {
|
|
|
|
font-size: 0.9em;
|
|
|
|
|
|
|
|
background-color: #f8f8f8;
|
|
|
|
|
|
|
|
border-radius: 6px;
|
|
|
|
border-radius: 6px;
|
|
|
|
|
|
|
|
background-color: #f8f8f8;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.bsa-cpc .default-text {
|
|
|
|
.bsa-cpc ::v-deep(a._default_) {
|
|
|
|
display: inline;
|
|
|
|
display: flex;
|
|
|
|
}
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
|
|
|
align-items: flex-start;
|
|
|
|
.bsa-cpc a._default_ {
|
|
|
|
|
|
|
|
text-align: left;
|
|
|
|
|
|
|
|
display: block;
|
|
|
|
|
|
|
|
text-decoration: none;
|
|
|
|
|
|
|
|
padding: 10px 15px 12px;
|
|
|
|
|
|
|
|
margin-bottom: 20px;
|
|
|
|
margin-bottom: 20px;
|
|
|
|
color: #666;
|
|
|
|
padding: 12px;
|
|
|
|
|
|
|
|
text-decoration: none;
|
|
|
|
|
|
|
|
line-height: 1.4;
|
|
|
|
font-weight: 400;
|
|
|
|
font-weight: 400;
|
|
|
|
line-height: 18px;
|
|
|
|
color: var(--c-text-light);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.bsa-cpc a._default_ .default-image img {
|
|
|
|
@media (min-width: 512px) {
|
|
|
|
height: 20px;
|
|
|
|
.bsa-cpc ::v-deep(a._default_) {
|
|
|
|
border-radius: 3px;
|
|
|
|
flex-wrap: nowrap;
|
|
|
|
vertical-align: middle;
|
|
|
|
}
|
|
|
|
position: relative;
|
|
|
|
|
|
|
|
top: -1px;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.bsa-cpc a._default_ .default-title {
|
|
|
|
.bsa-cpc ::v-deep(.default-ad) {
|
|
|
|
font-weight: 600;
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.bsa-cpc a._default_ .default-description:after {
|
|
|
|
.bsa-cpc ::v-deep(a._default_ .default-image) {
|
|
|
|
font-size: 0.85em;
|
|
|
|
flex-shrink: 0;
|
|
|
|
content: 'Sponsored';
|
|
|
|
margin-right: 12px;
|
|
|
|
color: #1c90f3;
|
|
|
|
width: 24px;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.bsa-cpc ::v-deep(a._default_ .default-image img) {
|
|
|
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
|
|
|
height: 24px;
|
|
|
|
|
|
|
|
vertical-align: middle;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.bsa-cpc ::v-deep(._default_::after) {
|
|
|
|
border: 1px solid #1c90f3;
|
|
|
|
border: 1px solid #1c90f3;
|
|
|
|
border-radius: 3px;
|
|
|
|
border-radius: 4px;
|
|
|
|
padding: 0 4px 1px;
|
|
|
|
margin-top: 8px;
|
|
|
|
margin-left: 6px;
|
|
|
|
margin-left: 36px;
|
|
|
|
|
|
|
|
padding: 0 8px;
|
|
|
|
|
|
|
|
line-height: 22px;
|
|
|
|
|
|
|
|
font-size: .85em;
|
|
|
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
|
|
|
color: #1c90f3;
|
|
|
|
|
|
|
|
content: 'Sponsored';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.bsa-cpc .default-ad {
|
|
|
|
@media (min-width: 512px) {
|
|
|
|
display: none;
|
|
|
|
.bsa-cpc ::v-deep(._default_::after) {
|
|
|
|
|
|
|
|
margin-top: 0px;
|
|
|
|
|
|
|
|
margin-left: 12px;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.bsa-cpc a._default_ .default-image,
|
|
|
|
.bsa-cpc ::v-deep(.default-text) {
|
|
|
|
.bsa-cpc a._default_ .default-title,
|
|
|
|
flex-grow: 1;
|
|
|
|
.bsa-cpc a._default_ .default-description {
|
|
|
|
align-self: center;
|
|
|
|
display: inline;
|
|
|
|
width: calc(100% - 36px);
|
|
|
|
vertical-align: middle;
|
|
|
|
}
|
|
|
|
margin-right: 6px;
|
|
|
|
|
|
|
|
|
|
|
|
@media (min-width: 512px) {
|
|
|
|
|
|
|
|
.bsa-cpc ::v-deep(.default-text) {
|
|
|
|
|
|
|
|
width: auto;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.bsa-cpc ::v-deep(.default-title) {
|
|
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.bsa-cpc ::v-deep(.default-description) {
|
|
|
|
|
|
|
|
padding-left: 8px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</style>
|
|
|
|