diff --git a/public/assets/svg/blog-logo.svg b/public/assets/svg/blog-logo.svg
deleted file mode 100644
index caada1f..0000000
--- a/public/assets/svg/blog-logo.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/components/features/contentful/CtfImage.tsx b/src/components/features/contentful/CtfImage.tsx
index 557b162..5016bd2 100644
--- a/src/components/features/contentful/CtfImage.tsx
+++ b/src/components/features/contentful/CtfImage.tsx
@@ -1,17 +1,18 @@
import NextImage, { ImageProps as NextImageProps } from 'next/image';
+import { useState } from 'react';
import { twMerge } from 'tailwind-merge';
import { ImageFieldsFragment } from '@src/lib/__generated/sdk';
interface ImageProps extends Omit {
nextImageProps?: Omit;
+ blurHash?: string;
}
-export const CtfImage = ({ url, width, height, title, nextImageProps }: ImageProps) => {
- if (!url || !width || !height) return null;
+export const CtfImage = ({ url, width, height, title, nextImageProps, blurHash }: ImageProps) => {
+ const [isLoading, setIsLoading] = useState(true);
- const blurURL = new URL(url);
- blurURL.searchParams.set('w', '10');
+ if (!url || !width || !height) return null;
return (
setIsLoading(false)}
+ priority
/>
);
};
diff --git a/src/pages/index.page.tsx b/src/pages/index.page.tsx
index ab1a639..6e73ba1 100644
--- a/src/pages/index.page.tsx
+++ b/src/pages/index.page.tsx
@@ -13,11 +13,13 @@ import Instagram from '@icons/instagram.svg';
import Linkedin from '@icons/linkedin.svg';
import Quora from '@icons/quora.svg';
import Resume from '@icons/resume.svg';
+import Stackshare from '@icons/stackshare.svg';
import { ArticleHero, ArticleImage, ArticleContent } from '@src/components/features/article';
import { SeoFields } from '@src/components/features/seo';
import { Container } from '@src/components/shared/container';
import { client, previewClient } from '@src/lib/client';
import { revalidateDuration } from '@src/pages/utils/constants';
+import { dynamicBlurDataUrl } from '@src/utilities/dynamicBlurDataUrl';
const Page = (props: InferGetStaticPropsType) => {
const { t } = useTranslation();
@@ -35,19 +37,19 @@ const Page = (props: InferGetStaticPropsType) => {
{page.seoFields && }
{page.featuredBlogPost && (
-
+
)}
-
+
{page.image && (
)}
@@ -66,7 +68,7 @@ const Page = (props: InferGetStaticPropsType) => {
{t('landingPage.reachMe')}
-
-
+
+ Buffer.from(await res.arrayBuffer()).toString('base64'),
+ );
+
+ const blurSvg = `
+
+ `;
+
+ const toBase64 = (str: string) =>
+ typeof window === 'undefined' ? Buffer.from(str).toString('base64') : window.btoa(str);
+
+ return `data:image/svg+xml;base64,${toBase64(blurSvg)}`;
+}