Skip to content

Commit

Permalink
✨ Add ads
Browse files Browse the repository at this point in the history
  • Loading branch information
Ovi committed Sep 2, 2022
1 parent 381ea75 commit 28ed0ec
Show file tree
Hide file tree
Showing 12 changed files with 51 additions and 0 deletions.
3 changes: 3 additions & 0 deletions views/docs-auth.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@

<main>
<div id="hero">
<!-- ads -->
<%- include('./partials/ads', { adId: '9625277182' }) %>

<h1>Docs</h1>
<p>
You can use examples below to check how DummyJSON works.
Expand Down
3 changes: 3 additions & 0 deletions views/docs-carts.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@

<main>
<div id="hero">
<!-- ads -->
<%- include('./partials/ads', { adId: '9625277182' }) %>

<h1>Docs</h1>
<p>
You can use examples below to check how DummyJSON works.
Expand Down
3 changes: 3 additions & 0 deletions views/docs-comments.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@

<main>
<div id="hero">
<!-- ads -->
<%- include('./partials/ads', { adId: '9625277182' }) %>

<h1>Docs</h1>
<p>
You can use examples below to check how DummyJSON works.
Expand Down
3 changes: 3 additions & 0 deletions views/docs-http.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@

<main>
<div id="hero">
<!-- ads -->
<%- include('./partials/ads', { adId: '9625277182' }) %>

<h1>Docs</h1>
<p>
You can use examples below to check how DummyJSON works.
Expand Down
3 changes: 3 additions & 0 deletions views/docs-posts.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@

<main>
<div id="hero">
<!-- ads -->
<%- include('./partials/ads', { adId: '9625277182' }) %>

<h1>Docs</h1>
<p>
You can use examples below to check how DummyJSON works.
Expand Down
3 changes: 3 additions & 0 deletions views/docs-products.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@

<main>
<div id="hero">
<!-- ads -->
<%- include('./partials/ads', { adId: '9625277182' }) %>

<h1>Docs</h1>
<p>
You can use examples below to check how DummyJSON works.
Expand Down
3 changes: 3 additions & 0 deletions views/docs-quotes.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@

<main>
<div id="hero">
<!-- ads -->
<%- include('./partials/ads', { adId: '9625277182' }) %>

<h1>Docs</h1>
<p>
You can use examples below to check how DummyJSON works.
Expand Down
3 changes: 3 additions & 0 deletions views/docs-todos.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@

<main>
<div id="hero">
<!-- ads -->
<%- include('./partials/ads', { adId: '9625277182' }) %>

<h1>Docs</h1>
<p>
You can use examples below to check how DummyJSON works.
Expand Down
3 changes: 3 additions & 0 deletions views/docs-users.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@

<main>
<div id="hero">
<!-- ads -->
<%- include('./partials/ads', { adId: '9625277182' }) %>

<h1>Docs</h1>
<p>
You can use examples below to check how DummyJSON works.
Expand Down
3 changes: 3 additions & 0 deletions views/docs.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@

<main>
<div id="hero">
<!-- ads -->
<%- include('./partials/ads', { adId: '9625277182' }) %>

<h1>How to use it</h1>
<p>
DummyJSON can be used with any type of front end project that needs
Expand Down
3 changes: 3 additions & 0 deletions views/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,9 @@ fetch('https://dummyjson.com/products/1')
}
</code></pre>
</blockquote>

<!-- ads -->
<%- include('./partials/ads', { adId: '8113483378' }) %>
</div>
</section>

Expand Down
18 changes: 18 additions & 0 deletions views/partials/ads.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<script
async
src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-1874186634672982"
crossorigin="anonymous"
></script>

<ins
class="adsbygoogle"
style="display:block"
data-ad-client="ca-pub-1874186634672982"
data-ad-slot="<%= adId %>"
data-ad-format="auto"
data-full-width-responsive="true"
></ins>

<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>

0 comments on commit 28ed0ec

Please sign in to comment.