Skip to content

Commit

Permalink
Merge pull request #24 from bmf-san/feature/update-ads-position
Browse files Browse the repository at this point in the history
広告位置の調整
  • Loading branch information
bmf-san authored Aug 27, 2022
2 parents 68e1eb2 + 1b8646b commit b632247
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 23 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ or
make docker-compose-up-d
```

Then go to `bmf-tech-client.local:81`
Then go to `bmf-tech-client.local:8081`
4 changes: 2 additions & 2 deletions app/Dockerfile.local
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ WORKDIR /go/bmf-tech-client/app
RUN apk update && \
apk upgrade && \
apk add --no-cache libc-dev gcc git openssh openssl bash && \
go get -u github.com/cosmtrek/air && \
go get -u golang.org/x/lint/golint
go install github.com/cosmtrek/air@latest && \
go install golang.org/x/lint/golint@latest

CMD air -c .air.toml
18 changes: 13 additions & 5 deletions app/templates/category/index.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,22 @@
<div class="row">
<div class="col">
<ul>
{{ range $i, $v := .Categories.Categories }}
<li>
<a href="/posts/categories/{{ $v.Name }}">{{ $v.Name }}</a>
</li>
{{ end }}
{{ range $i, $v := .Categories.Categories }}
<li>
<a href="/posts/categories/{{ $v.Name }}">{{ $v.Name }}</a>
</li>
{{ end }}
</ul>
</div>
</div>
<div class="row">
<div class="col">
<!-- Google Adsense ディスプレイ -->
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-5146230866088201" crossorigin="anonymous"></script>
<ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-5146230866088201" data-ad-slot="3559376296" data-ad-format="auto" data-full-width-responsive="true"></ins>
<script>(adsbygoogle = window.adsbygoogle || []).push({});</script>
</div>
</div>
</div>
{{ template "pagination" .Categories.Pagination }}
{{ end }}
11 changes: 1 addition & 10 deletions app/templates/layout/base.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,6 @@
gtag('config', 'G-784B55NW88');
</script>
<!-- Google Adsense -->
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-5146230866088201"
crossorigin="anonymous"></script>
<!-- bmf-tech -->
<ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-5146230866088201" data-ad-slot="9196954828"
data-ad-format="auto" data-full-width-responsive="true"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</head>
<body>
<header>
Expand Down Expand Up @@ -90,7 +81,7 @@
<hr>
<div class="row text-align-center">
<div class="col">
<small{{ year }} Kenta Takeuchi</small>
<small{{ year }} Kenta Takeuchi</small>
</div>
</div>
</div>
Expand Down
10 changes: 9 additions & 1 deletion app/templates/partial/posts.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,19 @@
<p>{{ striptags $v.HTMLBody | summary }}</p>
<div>
{{ range $v.Tags }}
<a class="tag" href="/posts/tags/{{ .Name }}">{{ .Name }}</a>
<a class="tag" href="/posts/tags/{{ .Name }}">{{ .Name }}</a>
{{ end }}
</div>
</article>
</div>
</div>
<div class="row">
<div class="col">
<!-- Google Adsense インフィード -->
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-5146230866088201" crossorigin="anonymous"></script>
<ins class="adsbygoogle" style="display:block" data-ad-format="fluid" data-ad-layout-key="-gw-3+1f-3d+2z" data-ad-client="ca-pub-5146230866088201" data-ad-slot="7900864416"></ins>
<script>(adsbygoogle = window.adsbygoogle || []).push({});</script>
</div>
</div>
{{ end }}
{{ end }}
15 changes: 11 additions & 4 deletions app/templates/post/show.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,20 @@
<div class="col">
<div class="margin-top-2rem margin-bottom-2rem">
{{ range .Post.Post.Tags }}
<a class="tag" href="/posts/tags/{{ .Name }}">{{ .Name }}</a>
<a class="tag" href="/posts/tags/{{ .Name }}">{{ .Name }}</a>
{{ end }}
</div>
<div>

<div>
{{ .Post.Post.HTMLBody | unescape }}
</div>
</div>
</div>
</div>
<div class="row">
<div class="col">
<!-- Google Adsense 記事内 -->
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-5146230866088201" crossorigin="anonymous"></script>
<ins class="adsbygoogle" style="display:block; text-align:center;" data-ad-layout="in-article" data-ad-format="fluid" data-ad-client="ca-pub-5146230866088201" data-ad-slot="5419252877"></ins>
<script>(adsbygoogle = window.adsbygoogle || []).push({});</script>
</div>
</div>
</div>
Expand Down
8 changes: 8 additions & 0 deletions app/templates/tag/index.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@
{{ end }}
</div>
</div>
<div class="row">
<div class="col">
<!-- Google Adsense ディスプレイ -->
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-5146230866088201"crossorigin="anonymous"></script>
<ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-5146230866088201" data-ad-slot="3559376296"data-ad-format="auto" data-full-width-responsive="true"></ins>
<script>(adsbygoogle = window.adsbygoogle || []).push({});</script>
</div>
</div>
</div>
{{ template "pagination" .Tags.Pagination }}
{{ end }}

0 comments on commit b632247

Please sign in to comment.