Skip to content

Commit

Permalink
feat: v3.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
surmon-china committed Dec 8, 2021
1 parent 8a5f19d commit ea30f8d
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 7 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

All notable changes to this project will be documented in this file.

### v3.2.1 (2021-12-08)

**Fix**

- Fix pages banner height
- Fix PC aside AdSense

### v3.2.0 (2021-12-08)

**Feature**
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "surmon.me",
"version": "3.2.0",
"version": "3.2.1",
"description": "Surmon.me blog",
"author": {
"name": "Surmon",
Expand Down
Binary file removed public/images/mammon/aliyun-minisite-532-178.jpg
Binary file not shown.
Binary file removed public/images/mammon/jd-baijiu-1200-100.jpg
Binary file not shown.
2 changes: 1 addition & 1 deletion src/components/common/banner.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@
.title {
font-size: 3em;
margin-top: 0;
margin-bottom: $lg-gap * 2;
}
.description {
font-size: $font-size-h4;
margin-bottom: 1em;
}
}
}
Expand Down
5 changes: 2 additions & 3 deletions src/components/layout/pc/aside/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@
</template>
</calendar>
</div>
<div class="module mammon-square" :placeholder="t(LANGUAGE_KEYS.AD)">
<div class="module mammon-square">
<client-only>
<Adsense
ins-class="adsbygoogle"
data-ad-client="ca-pub-4710915636313788"
ins-style="display:inline-block;width:250px;height:250px"
data-ad-slot="6138120718"
class="content"
/>
Expand Down Expand Up @@ -215,7 +215,6 @@
display: flex;
justify-content: center;
align-items: center;
@extend .center-placeholder;
.content {
height: 250px;
Expand Down
21 changes: 19 additions & 2 deletions src/services/adsense.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,19 @@ const getComponent = (clientID: string) =>
const { i18n } = useEnhancer()

return () => {
const { class: rootClass, insClass, insStyle, ...restAttrs } = props
const {
class: rootClass,
insClass,
insStyle,
dataAdClient,
dataAdSlot,
dataAdLayoutKey,
dataAdTest,
dataAdFormat,
dataFullWidthResponsive,
...restAttrs
} = props

return h(
'div',
{
Expand All @@ -62,7 +74,12 @@ const getComponent = (clientID: string) =>
h('ins', {
class: ['adsbygoogle', insClass],
style: insStyle,
'data-ad-client': clientID,
'data-ad-client': dataAdClient || clientID,
'data-ad-slot': dataAdSlot,
'data-ad-layout-key': dataAdLayoutKey,
'data-ad-test': dataAdTest,
'data-ad-format': dataAdFormat,
'data-full-width-responsive': dataFullWidthResponsive,
...restAttrs
}),
h('script', `(adsbygoogle = window.adsbygoogle || []).push({})`)
Expand Down

0 comments on commit ea30f8d

Please sign in to comment.