Skip to content

Commit c783ea7

Browse files
committed
trying out adsense
1 parent b7dd925 commit c783ea7

File tree

3 files changed

+32
-1
lines changed

3 files changed

+32
-1
lines changed

themes/vue/layout/partials/sidebar.ejs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,15 @@
1313
</li>
1414
</ul>
1515
</div>
16+
<div class="ad">
17+
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
18+
<!-- vue -->
19+
<ins class="adsbygoogle"
20+
style="display:inline-block;width:200px;height:200px"
21+
data-ad-client="ca-pub-5859894589064951"
22+
data-ad-slot="1367174238"></ins>
23+
<script>
24+
(adsbygoogle = window.adsbygoogle || []).push({});
25+
</script>
26+
</div>
1627
</div>

themes/vue/layout/post.ejs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,23 @@
88
<a href="/<%- post.path %>" class="sidebar-link"><%- post.title %></a>
99
</li>
1010
<% }) %>
11+
<li style="margin:10px 0 3px">
12+
<script data-gittip-username="yyx990803"
13+
data-gittip-widget="button"
14+
src="//gttp.co/v1.js"></script>
15+
</li>
1116
</ul>
17+
<div class="ad">
18+
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
19+
<!-- vue -->
20+
<ins class="adsbygoogle"
21+
style="display:inline-block;width:200px;height:200px"
22+
data-ad-client="ca-pub-5859894589064951"
23+
data-ad-slot="1367174238"></ins>
24+
<script>
25+
(adsbygoogle = window.adsbygoogle || []).push({});
26+
</script>
27+
</div>
1228
</div>
1329
</div>
1430
<div class="content blog">

themes/vue/source/css/page.styl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,12 @@ $header-height = 40px
6666
color $green
6767
&:hover
6868
border-bottom 2px solid $green
69+
.ad
70+
margin-top 20px
6971

7072
.content
7173
padding 2.2em 0
72-
max-width 720px
74+
max-width 600px
7375
margin 0 auto
7476
&.with-sidebar
7577
margin 0 0 0 280px
@@ -193,6 +195,8 @@ $header-height = 40px
193195
display block
194196
.list
195197
display none
198+
.ad
199+
display none
196200
&.open
197201
padding-bottom 1em
198202
.list

0 commit comments

Comments
 (0)