google ads test
This commit is contained in:
parent
c818433eff
commit
efa8a58e14
|
|
@ -5,7 +5,6 @@ module.exports = {
|
|||
description:
|
||||
'web前端技术博客,简洁至上,专注web前端学习与总结。JavaScript,js,ES6,TypeScript,vue,python,css3,html5,Node,git,github等技术文章。', // 描述,以 <meta> 标签渲染到页面html中
|
||||
// base: '/', // '/<github仓库名>/', 默认'/'
|
||||
// <script data-ad-client="ca-pub-7828333725993554" async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
|
||||
head: [
|
||||
// 注入到页面<head> 中的标签,格式[tagName, { attrName: attrValue }, innerHTML?]
|
||||
['link', { rel: 'icon', href: '/img/favicon.ico' }], //favicons,资源放在public文件夹
|
||||
|
|
|
|||
|
|
@ -58,6 +58,16 @@ body {
|
|||
}
|
||||
```
|
||||
|
||||
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
|
||||
<ins class="adsbygoogle"
|
||||
style="display:block; text-align:center;"
|
||||
data-ad-layout="in-article"
|
||||
data-ad-format="fluid"
|
||||
data-ad-client="ca-pub-7828333725993554"
|
||||
data-ad-slot="5062184441"></ins>
|
||||
<script>
|
||||
(adsbygoogle = window.adsbygoogle || []).push({});
|
||||
</script>
|
||||
|
||||
|
||||
## 添加深色模式自动响应
|
||||
|
|
@ -115,8 +125,3 @@ window.matchMedia('(prefers-color-scheme: light)').addListener(listeners.light)
|
|||
## 结论
|
||||
|
||||
我们不仅可以在布局方面响应不同尺寸屏幕,还可以按系统主题响应深色模式。我相信你的深夜访客,或者那些喜欢深色模式的人,会感谢你的。
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue