Skip to content

Commit

Permalink
refactor : change font in blog website
Browse files Browse the repository at this point in the history
  • Loading branch information
cp-mansi-d committed Aug 10, 2023
1 parent b568134 commit 09502fa
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 33 deletions.
18 changes: 1 addition & 17 deletions assets/css/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -50,22 +50,6 @@
src: url(./../fonts/Source-codePro.woff2);
}

@font-face {
font-family: "Product Sans Regular";
font-style: normal;
font-weight: 400;
font-display: swap;
src: url(./../fonts/ProductSans-Regular.woff2);
}

@font-face {
font-family: "Product Sans Black";
font-style: normal;
font-weight: 600;
font-display: swap;
src: url(./../fonts/ProductSans-Black.woff2);
}

@font-face {
font-family: "Poppins Light";
font-style: normal;
Expand Down Expand Up @@ -316,7 +300,7 @@ code::after {
}

.prose :where(blockquote, blockquote i):not(:where([class~="not-prose"] *)) {
@apply not-italic text-[1.4rem] lg:text-[1.755rem] leading-[2.3rem] text-[#757575] font-normal font-inter-light;
@apply not-italic text-[1.4rem] lg:text-[1.755rem] leading-[2.3rem] text-[#757575] font-normal tracking-wide font-inter-light;
}

.prose
Expand Down
Binary file removed assets/fonts/ProductSans-Black.woff2
Binary file not shown.
Binary file removed assets/fonts/ProductSans-Regular.woff2
Binary file not shown.
4 changes: 2 additions & 2 deletions components/authorDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default function AuthorDetails({ postData }) {
/>
</div>
<div className="flex flex-col space-y-3 items-center">
<div className="text-[1.7rem] font-product-black tracking-wide text-[#000000d6]">
<div className="text-[1.7rem] font-worksans-semibold tracking-normal text-[#000000d6]">
{postData.authorName}
</div>
{postData.authorBio ? (
Expand Down Expand Up @@ -54,7 +54,7 @@ export default function AuthorDetails({ postData }) {
postData.authorBio ? "space-y-4" : "space-y-1"
} md:-ml-16 xl:-ml-10 2xl:-ml-16`}
>
<div className="text-[1.7rem] font-product-black tracking-wide text-[#000000d6]">
<div className="text-[1.7rem] font-worksans-semibold tracking-normal text-[#000000d6]">
{postData.authorName}
</div>
{postData.authorBio ? (
Expand Down
24 changes: 12 additions & 12 deletions pages/[slug].js
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ export default function Post({ postData, status, posts, mixpanel }) {
/>
</div>

<div className="flex flex-col space-y-5 md:text-white ">
<div className="flex flex-col space-y-5 md:text-white">
<h1 className="text-[2.20rem] lg:text-[2.50rem] xl:text-[2.80rem] font-normal leading-10 lg:leading-tight tracking-tight">
{post.title}
</h1>
Expand All @@ -317,21 +317,21 @@ export default function Post({ postData, status, posts, mixpanel }) {
</div>
</div>
{tagsString ? (
<div className="flex flex-row 3xl:items-center space-x-3 text-[1rem] leading-6 tracking-normal">
<div className="sm:basis-6 w-5 h-5 mt-1.5 sm:mt-0.5 xl:mt-1.5 3xl:mt-0">
<div className="flex flex-row items-stretch space-x-3 text-[1rem] leading-6 tracking-normal">
<div className="self-start sm:basis-6 w-5 h-5 mt-1.5 lg:mt-0.5 xl:mt-1.5">
<FontAwesomeIcon
icon={faTags}
className="w-full h-full text-sm"
/>
</div>
<div className="basis-11/12 capitalize">
<div className="self-center basis-11/12 capitalize">
{tagsString}
</div>
</div>
) : (
""
)}
<div className="text-[1rem] md:text-[1.09rem] xl:text-[1.13rem] leading-6 md:leading-7 tracking-normal">
<div className="md:text-[#ffffffb3] text-[1rem] md:text-[1.09rem] xl:text-[1.13rem] leading-6 md:leading-7 tracking-normal">
{post.summary}
</div>
<div className="grid grid-cols-2 items-center text-sm">
Expand Down Expand Up @@ -361,10 +361,10 @@ export default function Post({ postData, status, posts, mixpanel }) {
/>
</div>

<div className="hidden lg:flex flex-row space-x-4 mr-4">
<div className="hidden lg:flex flex-row space-x-4 mr-4 text-gray-400">
<FontAwesomeIcon
icon={faFacebook}
className="w-7 h-7 sm:w-6 sm:h-6 hover:cursor-pointer"
className="w-7 h-7 sm:w-6 sm:h-6 hover:cursor-pointer hover:text-white"
onClick={() => {
mixpanel.track("tap_share_facebook");
window.open(
Expand All @@ -379,7 +379,7 @@ export default function Post({ postData, status, posts, mixpanel }) {
/>
<FontAwesomeIcon
icon={faLinkedinIn}
className="w-7 h-7 sm:w-6 sm:h-6 hover:cursor-pointer"
className="w-7 h-7 sm:w-6 sm:h-6 hover:cursor-pointer hover:text-white"
onClick={() => {
mixpanel.track("tap_share_linkedin");
window.open(
Expand All @@ -394,7 +394,7 @@ export default function Post({ postData, status, posts, mixpanel }) {
/>
<FontAwesomeIcon
icon={faTwitter}
className="w-7 h-7 sm:w-6 sm:h-6 hover:cursor-pointer"
className="w-7 h-7 sm:w-6 sm:h-6 hover:cursor-pointer hover:text-white"
onClick={() => {
mixpanel.track("tap_share_twitter");
window.open(
Expand All @@ -411,7 +411,7 @@ export default function Post({ postData, status, posts, mixpanel }) {
/>
<FontAwesomeIcon
icon={faReddit}
className="w-7 h-7 sm:w-6 sm:h-6 hover:cursor-pointer"
className="w-7 h-7 sm:w-6 sm:h-6 hover:cursor-pointer hover:text-white"
onClick={() => {
mixpanel.track("tap_share_reddit");
window.open(
Expand All @@ -426,7 +426,7 @@ export default function Post({ postData, status, posts, mixpanel }) {
/>
<FontAwesomeIcon
icon={faLink}
className="w-7 h-7 sm:w-6 sm:h-6 hover:cursor-pointer"
className="w-7 h-7 sm:w-6 sm:h-6 hover:cursor-pointer hover:text-white"
onClick={() => {
copyLink();
}}
Expand Down Expand Up @@ -500,7 +500,7 @@ export default function Post({ postData, status, posts, mixpanel }) {
})
: ""}
</div>
<AuthorDetails postData={post} />
{post.authorBio ? <AuthorDetails postData={post} /> : ""}
</div>
{/* Recommended Posts Section Desktop View */}

Expand Down
2 changes: 0 additions & 2 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ module.exports = {
"3xl": "1600px",
},
fontFamily: {
"product-black": ["Product Sans Black"],
"product-regular": ["Product Sans Regular"],
"inter-medium": ["Inter Medium"],
"inter-regular": ["Inter Regular"],
"inter-bold": ["Inter Bold"],
Expand Down

0 comments on commit 09502fa

Please sign in to comment.