Skip to content

Commit 3f9c97a

Browse files
committed
removed google adsense code because of the ban
1 parent d760e41 commit 3f9c97a

17 files changed

+16
-62
lines changed

components/Footer.js

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ const Footer = () => {
1212
padding: "50px 0 0",
1313
backgroundColor: "#222",
1414
color: "#eaeaea",
15+
marginTop: 30,
1516
}}
1617
>
1718
<div className='center container'>

components/PageLayout.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ const PageLayout = ({ children, className }) => {
99
<BlogNavBar />
1010
<div className={`page-wrapper ${className}`}>{children}</div>
1111
<div className='container'>
12-
<div
12+
{/* <div
1313
style={{
1414
margin: "1rem 0 1rem",
15-
paddingBottom: "7rem",
15+
paddingBottom: "1rem",
1616
textAlign: "center",
1717
overflow: "hidden",
1818
}}
1919
>
2020
<FixGoogleAds />
21-
</div>
21+
</div> */}
2222
</div>
2323
<Footer />
2424
</>

pages/[category].js

-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import FilteringMenu from "components/FilteringMenu";
99
import CardListItem from "components/CardListItem";
1010
import CardsItemRow from "components/CardsItemRow";
1111
import Aside from "components/Aside";
12-
import FixGoogleAds from "components/FixGoogleAds";
1312
import { Spinner } from "react-bootstrap";
1413

1514
const BlogList = ({ data = [], filter }) => {
@@ -67,7 +66,6 @@ function Category({ blogs, category }) {
6766
/>
6867

6968
{/* Google Ads */}
70-
<FixGoogleAds />
7169
<FilteringMenu
7270
filter={filter}
7371
onChange={(option, value) => {

pages/_app.js

-6
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import { useState, useEffect } from "react";
99
import PageLayout from "components/PageLayout";
1010
import { SEO } from "components/MetaDecorator";
1111
import { DefaultSeo } from "next-seo";
12-
const FixAdsBottom = dynamic(() => import("components/FixAdsBottom"));
1312
const CookieConsent = dynamic(() => import("react-cookie-consent"));
1413
const ScrollTop = dynamic(() => import("components/ScrollTop"));
1514
import { GA_TRACKING_ID } from "lib/gtag";
@@ -25,10 +24,6 @@ const App = ({ Component, pageProps }) => {
2524
}, []);
2625
return (
2726
<>
28-
{process.env.NODE_ENV === "production" && (
29-
<Script src='//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js' />
30-
)}
31-
3227
{process.env.NODE_ENV === "production" && (
3328
<Script
3429
src={`https://www.googletagmanager.com/gtag/js?id=${GA_TRACKING_ID}`}
@@ -78,7 +73,6 @@ const App = ({ Component, pageProps }) => {
7873
<a aria-label='learn more'>Learn more</a>
7974
</Link>
8075
</CookieConsent>
81-
{process.env.NODE_ENV === "production" && <FixAdsBottom />}
8276
<ScrollTop />
8377
</>
8478
);

pages/about.js

-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { BlogContent } from "components/BlogContent";
33
import { PageSeo } from "components/MetaDecorator";
44
const content = require("data/content");
55
import Aside from "components/Aside";
6-
import FixGoogleAds from "components/FixGoogleAds";
76

87
const About = ({ aboutData }) => {
98
return (
@@ -14,7 +13,6 @@ const About = ({ aboutData }) => {
1413
url={`${content.siteUrl}/about`}
1514
/>
1615
{/* Google Ads */}
17-
<FixGoogleAds />
1816
<div className='layoutWrapper'>
1917
<div className='wrapper-lg no-border'>
2018
<main className='main-content no-pad'>
@@ -24,13 +22,11 @@ const About = ({ aboutData }) => {
2422
<div className='title'>
2523
<h1>About</h1>
2624
</div>
27-
<FixGoogleAds />
2825

2926
{c.bio && <BlogContent content={c.bio} />}
3027
</div>
3128
);
3229
})}
33-
<FixGoogleAds />
3430
</main>
3531
</div>
3632
{/* Aside */}

pages/blogs/[slug].js

+2-5
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ const CommentForm = dynamic(() => import("components/CommentForm"));
1717
const NewsLetter = dynamic(() => import("components/NewsLetter"));
1818
import { Comments } from "components/Comments";
1919
import { BlogContent, TableContent } from "components/BlogContent";
20-
import FixGoogleAds from "components/FixGoogleAds";
2120
import Image from "next/image";
2221

2322
function BlogDetails({ blog: initialBlog, preview }) {
@@ -72,9 +71,7 @@ function BlogDetails({ blog: initialBlog, preview }) {
7271
tags={tags}
7372
/>
7473
{/* Google Ads */}
75-
<div style={{ margin: "0 0 70px" }}>
76-
<FixGoogleAds />
77-
</div>
74+
<div style={{ margin: "0 0 70px" }}></div>
7875
<Layout blog={initialBlog}>
7976
{preview && <PreviewAlert />}
8077

@@ -126,7 +123,7 @@ function BlogDetails({ blog: initialBlog, preview }) {
126123
{initialBlog.content && TableContent(initialBlog.content)}
127124

128125
{initialBlog.content && <BlogContent content={initialBlog.content} />}
129-
<FixGoogleAds />
126+
130127
<DownloadFile blog={blog} />
131128
<ShareSocial blog={initialBlog} />
132129
<Comments comments={initialBlog.comments} />

pages/blogs/index.js

-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import { getPaginatedBlogs } from "lib/api";
99
import CardListItem from "components/CardListItem";
1010
import CardsItemRow from "components/CardsItemRow";
1111
import Aside3 from "components/Aside3";
12-
import FixGoogleAds from "components/FixGoogleAds";
1312
import Breadcrumbs from "nextjs-breadcrumbs";
1413
import { Spinner } from "react-bootstrap";
1514

@@ -67,7 +66,6 @@ function AllBlogs({ blogs }) {
6766
/>
6867

6968
{/* Google Ads */}
70-
<FixGoogleAds />
7169
<FilteringMenu
7270
filter={filter}
7371
onChange={(option, value) => {
@@ -95,7 +93,6 @@ function AllBlogs({ blogs }) {
9593
<div className={!filter.view.list ? "d-grid" : ""}>
9694
<BlogList data={data || [blogs]} filter={filter} />
9795
</div>
98-
<FixGoogleAds />
9996
{/* Button */}
10097
<div style={{ textAlign: "center", margin: "50px 0 20px" }}>
10198
<button

pages/categories.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import Link from "next/link";
44
import { PageSeo } from "components/MetaDecorator";
55
const content = require("data/content");
66
import { getCategories } from "lib/api";
7-
import FixGoogleAds from "components/FixGoogleAds";
87

98
const Categories = ({ categories }) => {
109
const tags = categories?.map((category) => category.title);
@@ -17,8 +16,7 @@ const Categories = ({ categories }) => {
1716
tags={tags}
1817
/>
1918

20-
<FixGoogleAds />
21-
<div style={{ padding: "1rem" }}>
19+
<div style={{ padding: "1rem", marginTop: "30px" }}>
2220
<h2>All Categories</h2>
2321
<div className='category-grid'>
2422
{categories.map((category, index) => (

pages/confirmsubscription.js

-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { PageSeo } from "components/MetaDecorator";
22
const content = require("data/content");
33
import Aside from "components/Aside";
4-
import FixGoogleAds from "components/FixGoogleAds";
54
import Image from "next/image";
65

76
const Subscription = () => {
@@ -13,7 +12,6 @@ const Subscription = () => {
1312
url={`${content.siteUrl}/confirmsubscription`}
1413
/>
1514
{/* Google Ads */}
16-
<FixGoogleAds />{" "}
1715
<div className='layoutWrapper'>
1816
<div className='wrapper-lg no-border'>
1917
<main className='main-content no-pad'>
@@ -55,7 +53,6 @@ const Subscription = () => {
5553
/>
5654
</div>
5755
</div>
58-
<FixGoogleAds />
5956
</main>
6057
</div>
6158
{/* Aside */}

pages/contact.js

-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { PageSeo } from "components/MetaDecorator";
44
const content = require("data/content");
55
import Form from "components/Form";
66
import Aside from "components/Aside";
7-
import FixGoogleAds from "components/FixGoogleAds";
87

98
const Contact = ({ contactData }) => {
109
return (
@@ -15,7 +14,6 @@ const Contact = ({ contactData }) => {
1514
url={`${content.siteUrl}/contact`}
1615
/>
1716
{/* Google Ads */}
18-
<FixGoogleAds />{" "}
1917
<div className='layoutWrapper'>
2018
<div className='wrapper-lg no-border'>
2119
<main className='main-content no-pad'>
@@ -26,12 +24,10 @@ const Contact = ({ contactData }) => {
2624
<h1>{c.title}</h1>
2725
</div>
2826

29-
<FixGoogleAds />
3027
{c.content && <BlogContent content={c.content} />}
3128
</div>
3229
);
3330
})}
34-
<FixGoogleAds />
3531
<Form />
3632
</main>
3733
</div>

pages/index.js

+1-15
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ import { PageSeo } from "components/MetaDecorator";
1212
const content = require("data/content");
1313
const PreviewAlert = dynamic(() => import("components/PreviewAlert"));
1414
import Aside from "components/Aside";
15-
import FixGoogleAds from "components/FixGoogleAds";
16-
import CustomGoogleAds from "components/CustomGoogleAds";
1715
import generateRSSFeed from "scripts/rss";
1816

1917
function Home({ popularBlog, newsBlog, dealsBlog, preview }) {
@@ -25,7 +23,6 @@ function Home({ popularBlog, newsBlog, dealsBlog, preview }) {
2523
url={`${content.siteUrl}`}
2624
/>
2725
{/* Google Ads */}
28-
<FixGoogleAds />
2926
<div className='layoutWrapper'>
3027
<div className='wrapper-lg no-border'>
3128
<main className='main-content no-pad'>
@@ -46,12 +43,6 @@ function Home({ popularBlog, newsBlog, dealsBlog, preview }) {
4643
</div>
4744
))}
4845

49-
<div style={{ margin: ".5rem" }}>
50-
<CustomGoogleAds
51-
slot={process.env.NEXT_PUBLIC_DISPLAY_ADS}
52-
layout='in-article'
53-
/>
54-
</div>
5546
<div className='news-grid'>
5647
{newsBlog?.map((blog) => (
5748
<div key={`${newsBlog.length}-${Math.random()}-list`}>
@@ -66,12 +57,7 @@ function Home({ popularBlog, newsBlog, dealsBlog, preview }) {
6657
</div>
6758
))}
6859
</div>
69-
<div style={{ margin: ".5rem" }}>
70-
<CustomGoogleAds
71-
slot={process.env.NEXT_PUBLIC_DISPLAY_ADS}
72-
layout='in-article'
73-
/>
74-
</div>
60+
7561
<span
7662
style={{ margin: "25px 0 25px", display: "inline-block" }}
7763
className='home-title'

pages/privacy.js

-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { BlogContent } from "components/BlogContent";
33
import { PageSeo } from "components/MetaDecorator";
44
const content = require("data/content");
55
import Aside from "components/Aside";
6-
import FixGoogleAds from "components/FixGoogleAds";
76

87
const Privacy = ({ privacyData }) => {
98
return (
@@ -14,7 +13,6 @@ const Privacy = ({ privacyData }) => {
1413
url={`${content.siteUrl}/privacy`}
1514
/>
1615
{/* Google Ads */}
17-
<FixGoogleAds />{" "}
1816
<div className='layoutWrapper'>
1917
<div className='wrapper-lg no-border'>
2018
<main className='main-content no-pad'>
@@ -24,12 +22,10 @@ const Privacy = ({ privacyData }) => {
2422
<div className='title'>
2523
<h1>{c.title}</h1>
2624
</div>
27-
<FixGoogleAds />
2825
{c.content && <BlogContent content={c.content} />}
2926
</div>
3027
);
3128
})}
32-
<FixGoogleAds />
3329
</main>
3430
</div>
3531
{/* Aside */}

pages/search.js

-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import SearchListItem from "components/SearchListItem";
77
import { PageSeo } from "components/MetaDecorator";
88
import Aside from "components/Aside";
99
const content = require("data/content");
10-
import FixGoogleAds from "components/FixGoogleAds";
1110
import Breadcrumbs from "nextjs-breadcrumbs";
1211
import { Spinner } from "react-bootstrap";
1312

@@ -65,7 +64,6 @@ function Search({ query, blogs, searchResults }) {
6564
url={`${content.siteUrl}/search?${query}`}
6665
/>
6766
{/* Google Ads */}
68-
<FixGoogleAds />
6967
<div className='layoutWrapper'>
7068
<div className='wrapper-lg no-border'>
7169
<main className='main-content no-pad'>

pages/terms.js

+1-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { BlogContent } from "components/BlogContent";
33
import { PageSeo } from "components/MetaDecorator";
44
const content = require("data/content");
55
import Aside from "components/Aside";
6-
import FixGoogleAds from "components/FixGoogleAds";
76

87
const Terms = ({ termsData }) => {
98
return (
@@ -14,7 +13,7 @@ const Terms = ({ termsData }) => {
1413
url={`${content.siteUrl}/terms`}
1514
/>
1615
{/* Google Ads */}
17-
<FixGoogleAds />
16+
1817
<div className='layoutWrapper'>
1918
<div className='wrapper-lg no-border'>
2019
<main className='main-content no-pad'>
@@ -24,12 +23,10 @@ const Terms = ({ termsData }) => {
2423
<div className='title'>
2524
<h1>{c.title}</h1>
2625
</div>
27-
<FixGoogleAds />
2826
{c.content && <BlogContent content={c.content} />}
2927
</div>
3028
);
3129
})}
32-
<FixGoogleAds />
3330
</main>
3431
</div>
3532
{/* Aside */}

public/rss/atom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<feed xmlns="http://www.w3.org/2005/Atom">
33
<id>https://www.wpcodevo.com</id>
44
<title>Codevo | A place to improve your JAVASCRIPT, HTML and CSS Skills</title>
5-
<updated>2021-12-14T07:19:16.120Z</updated>
5+
<updated>2021-12-29T07:44:58.189Z</updated>
66
<generator>Next.js using Feed for Node.js</generator>
77
<author>
88
<name>Ziddah Edem</name>

public/rss/feed.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<title>Codevo | A place to improve your JAVASCRIPT, HTML and CSS Skills</title>
55
<link>https://www.wpcodevo.com</link>
66
<description>Tutorials about modern html5, css3, JavaScript, Frameworks such as React, Vuejs, Angular and all things related to Web development.</description>
7-
<lastBuildDate>Tue, 14 Dec 2021 07:19:16 GMT</lastBuildDate>
7+
<lastBuildDate>Wed, 29 Dec 2021 07:44:58 GMT</lastBuildDate>
88
<docs>https://validator.w3.org/feed/docs/rss2.html</docs>
99
<generator>Next.js using Feed for Node.js</generator>
1010
<language>en</language>

0 commit comments

Comments
 (0)