Skip to content

Commit

Permalink
feat: Add AdBanner
Browse files Browse the repository at this point in the history
Signed-off-by: Sangam Kumar <[email protected]>
  • Loading branch information
sangamcse committed Sep 6, 2023
1 parent a9317a6 commit b70e68e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
11 changes: 11 additions & 0 deletions src/components/ad_banner.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from 'react';

export const AdBanner = (props) => {
return (
<iframe
sandbox="allow-popups allow-scripts allow-modals allow-forms allow-same-origin"
src="//ws-in.amazon-adsystem.com/widgets/q?ServiceVersion=20070822&OneJS=1&Operation=GetAdHtml&MarketPlace=IN&source=ss&ref=as_ss_li_til&ad_type=product_link&tracking_id=sangam03d-21&language=en_IN&marketplace=amazon&region=IN&placement=B0C5N4RM5Z&asins=B0C5N4RM5Z&linkId=4972ad9b2d27b18b08d0e65a6fd9c0d2&show_border=true&link_opens_in_new_window=true"
{...props}
></iframe>
);
};
6 changes: 5 additions & 1 deletion src/components/blog/blog_post/blog_post.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import dynamic from 'next/dynamic';
import { MDXRemote } from 'next-mdx-remote';

import { FeaturedImage } from 'components/blog/featured_image';
import { AdBanner } from 'components/ad_banner';
import { blogComponents } from 'utils/mdx';

const BelowTheFold = dynamic(() => import('./below_the_fold'));
Expand All @@ -11,7 +12,7 @@ export const BlogPost = ({
source,
}) => {
return (
<div className="bg-prism">
<div className="bg-prism lg:relative">
<main className="m-auto py-8 prose lg:prose-lg xl:prose-xl">
<article>
<div className="px-4">
Expand All @@ -30,6 +31,9 @@ export const BlogPost = ({
<BelowTheFold title={title} tags={tags} />
</article>
</main>
<div className="lg:absolute lg:right-0 items-center lg:top-1/2 lg:transform lg:-translate-y-1/2 p-8">
<AdBanner height={240} width={120} className="m-auto" />
</div>
</div>
);
};

1 comment on commit b70e68e

@vercel
Copy link

@vercel vercel bot commented on b70e68e Sep 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

portfolio – ./

portfolio-sangamcse.vercel.app
sangam.dev
portfolio-git-master-sangamcse.vercel.app
www.sangam.dev

Please sign in to comment.