Skip to content

Commit

Permalink
asas
Browse files Browse the repository at this point in the history
  • Loading branch information
imswarnil committed Jun 12, 2024
1 parent 11de7a2 commit b2ae08c
Show file tree
Hide file tree
Showing 3 changed files with 188 additions and 64 deletions.
171 changes: 109 additions & 62 deletions _includes/ad/adsense.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
{%- case include.type -%}
{%- when 'square' -%}
<script
async
src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client={{ site.data-ad-client }}"
crossorigin="anonymous"
></script>
<!-- Square ( Responsive ) -->
<style>
.square {
width: auto;
height: 250px;
margin: 0 auto;
}

@media (max-width: 799px) {
Expand All @@ -23,39 +27,54 @@
}
</style>

<div
class="columns is-centered is-vcentered is-paddingless"
>
<ins
class="adsbygoogle square is-centered animate-on-scroll"
data-ad-client="{{ site.data-ad-client }}"
data-ad-slot="7663977887"
>
</ins>
<div class="columns is-centered is-vcentered">
<div class="column is-one-third has-text-centered">
<ins
class="adsbygoogle square"
data-ad-client="{{ site.data-ad-client }}"
data-ad-slot="7663977887"
>
</ins>
</div>
</div>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>

{%- when 'button' -%}
<!-- Square ( Responsive ) -->
<script
async
src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client={{ site.data-ad-client }}"
crossorigin="anonymous"
></script>
<!-- Button ( Responsive ) -->
<style>
.button {
width: auto;
height: 60px;
}
</style>

<ins
class="adsbygoogle button"
data-ad-client="{{ site.data-ad-client }}"
data-ad-slot="3836856744"
></ins>
<div class="columns is-centered is-vcentered">
<div class="column is-narrow has-text-centered">
<ins
class="adsbygoogle button"
data-ad-client="{{ site.data-ad-client }}"
data-ad-slot="3836856744"
>
</ins>
</div>
</div>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>

{%- when 'top-leaderboard' -%}
<script
async
src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client={{ site.data-ad-client }}"
crossorigin="anonymous"
></script>
<style>
.top-leaderboard {
height: 90px;
Expand All @@ -68,9 +87,7 @@
}
}
</style>
<div
class="container is-centered p-1"
>
<div class="container has-text-centered">
<ins
class="adsbygoogle top-leaderboard"
data-ad-client="{{ site.data-ad-client }}"
Expand Down Expand Up @@ -102,21 +119,27 @@
}
</style>

<div
class="columns is-centered is-vcentered is-paddingless"
>
<ins
class="adsbygoogle small-leaderboard is-centered animate-on-scroll"
data-ad-client="{{ site.data-ad-client }}"
data-ad-slot="3487917390"
>
</ins>
<div class="columns is-centered is-vcentered">
<div class="column is-narrow has-text-centered">
<ins
class="adsbygoogle small-leaderboard"
data-ad-client="{{ site.data-ad-client }}"
data-ad-slot="3487917390"
>
</ins>
</div>
</div>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>

{%- when 'large-leaderboard' -%}
<script
async
src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client={{ site.data-ad-client }}"
crossorigin="anonymous"
></script>

<style>
.large-leaderboard {
width: auto;
Expand All @@ -138,21 +161,26 @@
}
</style>

<div
class="columns is-centered is-vcentered is-paddingless"
>
<ins
class="adsbygoogle large-leaderboard is-centered animate-on-scroll"
data-ad-client="{{ site.data-ad-client }}"
data-ad-slot="3487917390"
>
</ins>
<div class="columns is-centered is-vcentered">
<div class="column is-one-third has-text-centered">
<ins
class="adsbygoogle large-leaderboard"
data-ad-client="{{ site.data-ad-client }}"
data-ad-slot="3487917390"
>
</ins>
</div>
</div>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>

{%- when 'skyscraper' -%}
<script
async
src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client={{ site.data-ad-client }}"
crossorigin="anonymous"
></script>
<style>
.skyscraper {
width: 250px;
Expand Down Expand Up @@ -181,16 +209,15 @@
}
</style>

<!-- Horizontal ( Responsive ) -->
<div
class="columns is-centered is-vcentered is-paddingless"
>
<ins
class="adsbygoogle skyscraper is-centered animate-on-scroll"
data-ad-client="{{ site.data-ad-client }}"
data-ad-slot="8939839370"
>
</ins>
<div class="columns is-centered is-vcentered">
<div class="column is-narrow has-text-centered">
<ins
class="adsbygoogle skyscraper"
data-ad-client="{{ site.data-ad-client }}"
data-ad-slot="8939839370"
>
</ins>
</div>
</div>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
Expand Down Expand Up @@ -255,18 +282,27 @@
crossorigin="anonymous"
></script>

<!-- small skyscraper -->
<ins
class="adsbygoogle small-skyscraper"
data-ad-client="{{ site.data-ad-client }}"
data-ad-slot="3487917390"
></ins>

<!-- Small Skyscraper -->
<div class="columns is-centered is-vcentered">
<div class="column is-narrow has-text-centered">
<ins
class="adsbygoogle small-skyscraper"
data-ad-client="{{ site.data-ad-client }}"
data-ad-slot="3487917390"
>
</ins>
</div>
</div>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>

{%- when 'article' -%}
<script
async
src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client={{ site.data-ad-client }}"
crossorigin="anonymous"
></script>
<style>
.article {
border-radius: 10px;
Expand All @@ -280,20 +316,30 @@
}
</style>

<ins
class="adsbygoogle article"
data-ad-layout="in-article"
data-ad-format="fluid"
data-ad-client="{{ site.data-ad-client }}"
data-ad-slot="6501428979"
></ins>
<div class="columns is-centered">
<div class="column is-full has-text-centered">
<ins
class="adsbygoogle article"
data-ad-layout="in-article"
data-ad-format="fluid"
data-ad-client="{{ site.data-ad-client }}"
data-ad-slot="6501428979"
>
</ins>
</div>
</div>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>

{%- when 'multiplex' -%}
<script
async
src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client={{ site.data-ad-client }}"
crossorigin="anonymous"
></script>
<ins
class="adsbygoogle ad"
class="adsbygoogle"
style="display:block"
data-ad-format="autorelaxed"
data-ad-client="{{ site.data-ad-client }}"
Expand All @@ -302,6 +348,7 @@
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>

{%- else -%}
<!-- Invalid ad type -->
{%- endcase -%}
77 changes: 77 additions & 0 deletions _layouts/ad.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
---
layout: default
---
<article class="section">
<div class="container">
<div class="columns">
<div class="column is-8 is-offset-2">
<!-- Post Header -->
<header class="post-header">
<h1 class="title is-1">{{ page.title }}</h1>
<p class="subtitle is-4">
<span class="icon"><i class="fas fa-calendar-alt"></i></span>
{{ page.date | date: '%B %d, %Y' }}
<span class="icon"><i class="fas fa-user"></i></span> {{ page.author }}
</p>
</header>

<!-- Top Leaderboard Ad -->
{% include ad/adsense.html type="top-leaderboard" %}

<!-- Post Content -->
<div class="content">
{{ content }}
</div>

<!-- Square Ad -->
{% include ad/adsense.html type="square" %}

<!-- Article Ad -->
{% include ad/adsense.html type="article" %}

<!-- Bottom Leaderboard Ad -->
{% include ad/adsense.html type="small-leaderboard" %}

<!-- Post Footer -->
<footer class="post-footer">
<nav class="level">
<div class="level-left">
{% if page.previous %}
<div class="level-item">
<a class="button is-light" href="{{ page.previous.url }}">
<span class="icon"><i class="fas fa-arrow-left"></i></span>
<span>Previous Post</span>
</a>
</div>
{% endif %}
</div>
<div class="level-right">
{% if page.next %}
<div class="level-item">
<a class="button is-light" href="{{ page.next.url }}">
<span>Next Post</span>
<span class="icon"><i class="fas fa-arrow-right"></i></span>
</a>
</div>
{% endif %}
</div>
</nav>
</footer>
</div>

<!-- Sidebar with Ads -->
<div class="column is-2">
<aside>
<!-- Button Ad -->
{% include ad/adsense.html type="button" %}

<!-- Skyscraper Ad -->
{% include ad/adsense.html type="skyscraper" %}

<!-- Small Skyscraper Ad -->
{% include ad/adsense.html type="skyscraper-small" %}
</aside>
</div>
</div>
</div>
</article>
4 changes: 2 additions & 2 deletions _posts/2018-05-28-why-use-a-static-site-generator.markdown
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
layout: post
layout: ad
title: "My First Post"
date: 2024-05-22
image: "https://via.placeholder.com/600x400"
permalink : /post
sidebar : true
sidebar : false
---

```json
Expand Down

0 comments on commit b2ae08c

Please sign in to comment.