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 Sep 6, 2023
1 parent c8ce556 commit c608bc8
Show file tree
Hide file tree
Showing 28 changed files with 275 additions and 285 deletions.
86 changes: 53 additions & 33 deletions assets/css/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
@tailwind utilities;

@font-face {
font-family: "Inter Medium";
font-family: "Inter ExtraLight";
font-style: normal;
font-weight: 400;
font-weight: 200;
font-display: swap;
src: url(./../fonts/Inter-Medium.woff2);
src: url(./../fonts/Inter-ExtraLight.woff2);
}

@font-face {
Expand All @@ -19,27 +19,27 @@
}

@font-face {
font-family: "Inter Bold";
font-family: "Inter Medium";
font-style: normal;
font-weight: 400;
font-weight: 500;
font-display: swap;
src: url(./../fonts/Inter-Bold.woff2);
src: url(./../fonts/Inter-Medium.woff2);
}

@font-face {
font-family: "Inter SemiBold";
font-style: normal;
font-weight: 400;
font-weight: 600;
font-display: swap;
src: url(./../fonts/Inter-SemiBold.woff2);
}

@font-face {
font-family: "Inter ExtraLight";
font-family: "Inter Bold";
font-style: normal;
font-weight: 400;
font-weight: 700;
font-display: swap;
src: url(./../fonts/Inter-ExtraLight.woff2);
src: url(./../fonts/Inter-Bold.woff2);
}

@font-face {
Expand All @@ -51,43 +51,51 @@
}

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

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

@font-face {
font-family: "Poppins Light";
font-family: "Comme Light";
font-style: normal;
font-weight: 600;
font-weight: 300;
font-display: swap;
src: url(./../fonts/Poppins-Light.woff2);
src: url(./../fonts/Comme-Light.woff2);
}

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

@font-face {
font-family: "Poppins Medium";
font-family: "Comme Medium";
font-style: normal;
font-weight: 500;
font-display: swap;
src: url(./../fonts/Poppins-Medium.woff2);
src: url(./../fonts/Comme-Medium.woff2);
}

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

input:-webkit-autofill,
Expand Down Expand Up @@ -118,21 +126,21 @@ input:-webkit-autofill:active {
}

body {
@apply font-product-regular break-words text-[#000000d6];
@apply font-inter-regular break-words text-black-core/[0.87];
}

.content > p {
@apply pb-8;
}

.prose > * {
@apply text-[1.125rem] md:text-[1.27rem] md:leading-[2rem] tracking-[0.04em];
@apply text-lg md:text-[1.1875rem] md:leading-8;
}

.comment input[type="text"],
.comment input[type="email"],
.comment textarea {
@apply my-2 border border-solid border-gray-300 rounded bg-white bg-clip-padding px-3 py-1.5 font-normal text-base text-gray-700 transition ease-in-out focus:border-gray-300 focus:outline-none focus:bg-white focus:text-gray-700;
@apply my-2 border border-solid border-gray-300 rounded bg-white bg-clip-padding px-3 py-1.5 font-normal text-base text-black-core/[0.75] transition ease-in-out focus:border-gray-300 focus:outline-none focus:bg-white focus:text-black-core/[0.75];
}

.comment input[type="submit"] {
Expand All @@ -152,15 +160,15 @@ body {
}

.gradient-border-btn {
@apply border-[1px] border-solid border-transparent rounded-[0.6rem] bg-gradient-to-r from-[#f2709c] via-[#ff909c] to-[#ff9472] shadow-[inset_2px_1000px_1px_#fff] p-[1rem] text-center hover:border-[1px] hover:border-solid hover:border-transparent hover:from-[#f2709c] hover:to-[#ff9472] hover:shadow-none active:scale-[0.98];
@apply border border-solid border-transparent rounded-[0.6rem] bg-gradient-to-r from-[#f2709c] via-[#ff909c] to-[#ff9472] shadow-[inset_2px_1000px_1px_#fff] p-[1rem] text-center hover:border hover:border-solid hover:border-transparent hover:from-[#f2709c] hover:to-[#ff9472] hover:shadow-none active:scale-[0.98];
}

.gradient-border-btn > a > .fab {
@apply text-[#f2709c];
}

.gradient-border-btn > span {
@apply my-0 mx-[6px] text-[#3d3d3d];
@apply my-0 mx-1.5 text-[#3d3d3d];
}

.gradient-border-btn:hover > span,
Expand Down Expand Up @@ -189,15 +197,15 @@ ul {
}

strong {
@apply font-product-black tracking-wide;
@apply font-comme-medium tracking-[0.01em] !text-black-core/[1] !font-medium text-[1.0625rem] md:text-[1.15625rem];
}

h1 strong {
@apply text-[1.8rem] lg:text-[2rem];
}

h2 strong {
@apply text-[1.5rem] lg:text-[1.7rem];
@apply text-2xl lg:text-[1.7rem] font-comme-semibold;
}

/* HighlightJS */
Expand Down Expand Up @@ -282,17 +290,29 @@ code::after {
@apply content-none !important;
}

.prose h2 {
@apply font-comme-semibold text-[#000] xl:text-[2.0625rem] !mb-4 !tracking-tight;
}

.prose i,
.prose a span {
@apply font-comme-regular text-lg text-black-core/[0.87] tracking-[0.03rem];
}

.prose
:where(code, code strong):not(:where([class~="not-prose"], blockquote code)) {
@apply bg-gray-200 py-0.5 px-1 rounded-[4px] font-[550] tracking-wide font-source-codepro;
@apply bg-gray-200 py-0.5 px-1 rounded font-[550] tracking-wide font-source-codepro;
}

.prose :where(pre code):not(:where([class~="not-prose"] *)) {
@apply bg-transparent text-[#dbe0e0] leading-normal tracking-[-0.022em] !break-normal;
}

.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;
.prose
:where(blockquote, blockquote i, blockquote i strong):not(
:where([class~="not-prose"] *)
) {
@apply not-italic !text-[1.4rem] lg:!text-[1.755rem] !leading-[2.3rem] !text-black-core/[0.75] !font-normal tracking-wide font-inter-extralight;
}

.prose
Expand All @@ -308,7 +328,7 @@ code::after {

.category-swiper .swiper-button-next:after,
.category-swiper .swiper-button-prev:after {
@apply px-7 pb-[1rem] pt-1 text-black-900 !text-[12px];
@apply px-7 pb-4 pt-1 text-black-900 !text-xs;
}

.category-swiper .swiper-button-prev:after {
Expand Down
Binary file added assets/fonts/Comme-Light.woff2
Binary file not shown.
Binary file added assets/fonts/Comme-Medium.woff2
Binary file not shown.
Binary file added assets/fonts/Comme-Regular.woff2
Binary file not shown.
Binary file added assets/fonts/Comme-SemiBold.woff2
Binary file not shown.
Binary file removed assets/fonts/Poppins-Light.woff2
Binary file not shown.
Binary file removed assets/fonts/ProductSans-Black.woff2
Binary file not shown.
Binary file removed assets/fonts/ProductSans-Regular.woff2
Binary file not shown.
38 changes: 13 additions & 25 deletions components/authorDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Image from "next/image";

export default function AuthorDetails({ postData }) {
return (
<div className="w-full mt-16 bg-[#f7f7f7] py-0.5 text-[#374151]">
<div className="w-full mt-16 bg-[#f7f7f7] py-0.5 text-black-core/[0.75] font-inter-regular">
<div className="sm:hidden container mx-5">
<hr className="bg-gray-600 w-full py-[0.7px] !mt-2 mb-0" />
<div className="flex flex-col items-center my-5">
Expand All @@ -16,23 +16,15 @@ 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.6875rem] font-inter-semibold tracking-normal text-black-core/[0.87]">
{postData.authorName}
</div>
{postData.authorBio ? (
<>
<div className="text-[1rem] leading-snug tracking-wide text-center">
{postData.authorBio}
</div>
<div className="!mt-7 text-[0.9rem] capitalize">
{postData.authorRole}
</div>
</>
) : (
<div className="text-[0.9rem] capitalize">
{postData.authorRole}
</div>
)}
<div className="text-base leading-normal tracking-normal text-center">
{postData.authorBio}
</div>
<div className="!mt-7 text-[0.8750rem] capitalize tracking-normal">
{postData.authorRole}
</div>
</div>
</div>
<hr className="bg-gray-600 w-full py-[0.5px] !mb-3 mt-0" />
Expand All @@ -54,17 +46,13 @@ 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.6875rem] font-inter-semibold tracking-normal text-black-core/[0.87]">
{postData.authorName}
</div>
{postData.authorBio ? (
<div className="text-[1rem] leading-snug tracking-wide">
{postData.authorBio}
</div>
) : (
""
)}
<div className="text-[0.9rem] capitalize">
<div className="text-base leading-normal tracking-normal">
{postData.authorBio}
</div>
<div className="text-[0.8750rem] capitalize tracking-normal">
{postData.authorRole}
</div>
</div>
Expand Down
12 changes: 6 additions & 6 deletions components/comments/commentForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ export default function CommentForm({ post, onNewComment, recaptchaRef }) {
}, [formRef]);

return (
<div className="container py-20 tracking-wide">
<div className="flex items-center pb-5 font-semibold text-xl">
<div className="container py-20 tracking-normal">
<div className="flex items-center pb-5 font-inter-semibold text-xl">
<FontAwesomeIcon
icon={faMessage}
className="w-7 h-7 pr-2 text-pink-300"
Expand All @@ -76,7 +76,7 @@ export default function CommentForm({ post, onNewComment, recaptchaRef }) {
required
/>
<div className={`pt-4 ${showForm ? "block" : "hidden"}`} ref={formRef}>
<label className="mb-3 text-lg text-gray-700">Name</label>
<label className="mb-3 text-lg text-black-core/[0.75]">Name</label>
<span className="ml-1 text-red-600">*</span>
<input
id="name"
Expand All @@ -87,7 +87,7 @@ export default function CommentForm({ post, onNewComment, recaptchaRef }) {
placeholder="Your Name"
required
/>
<label className="mb-3 text-lg text-gray-700">Email</label>
<label className="mb-3 text-lg text-black-core/[0.75]">Email</label>
<span className="ml-1 text-red-600">*</span>
<input
id="email"
Expand All @@ -98,8 +98,8 @@ export default function CommentForm({ post, onNewComment, recaptchaRef }) {
placeholder="Your E-mail Address"
required
/>
<button className="relative mt-7 rounded-[12px] border-[1px] border-solid border-transparent bg-gradient-to-r from-[#f2709c] to-[#ff9472] hover:shadow-[inset_2px_1000px_1px_#fff] py-[0.8rem] font-bold text-white">
<span className="py-[1.25rem] px-3 hoverable-text text-lg">
<button className="relative mt-7 rounded-xl border border-solid border-transparent bg-gradient-to-r from-[#f2709c] to-[#ff9472] hover:shadow-[inset_2px_1000px_1px_#fff] py-[0.8rem] font-bold text-white">
<span className="py-5 px-3 hoverable-text text-lg">
Post Comment
</span>
</button>
Expand Down
4 changes: 2 additions & 2 deletions components/comments/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export default function Comment({ post }) {
>
<div className="flex justify-between items-center">
<div className="flex items-center">
<div className="relative w-[40px] h-[40px] mb-2 md:mb-0">
<div className="relative w-10 h-10 mb-2 md:mb-0">
<Image
className="rounded-full h-full w-full object-cover absolute inset-0"
layout="fill"
Expand Down Expand Up @@ -108,7 +108,7 @@ export default function Comment({ post }) {
<li className="px-5 py-5 bg-white border border-solid border-gray-300 rounded-[15px]">
<div className="flex justify-between items-center">
<div className="flex items-center">
<div className="relative w-[40px] h-[40px] mb-2 md:mb-0">
<div className="relative w-10 h-10 mb-2 md:mb-0">
<Image
className="rounded-full h-full w-full object-cover absolute inset-0"
layout="fill"
Expand Down
18 changes: 9 additions & 9 deletions components/cta/CTA1.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,29 +42,29 @@ export default function CTA() {
src={ctabg400w}
loading="lazy"
alt="cta-bg-image"
className="absolute top-[-6.5rem] sm:left-[4.5rem] md:left-[6.5rem] w-[100%] sm:w-[80%] object-content"
className="absolute top-[-6.5rem] sm:left-[4.5rem] md:left-[6.5rem] w-full sm:w-4/5 object-content"
/>
</div>
<div className="xl:container xl:flex xl:flex-row">
<div className="flex flex-col items-center xl:items-start xl:mb-20 xl:w-[60%] 2xl:w-[50%]">
<p className="text-center xl:text-left text-[1.875rem] md:text-[2.813rem] lg:text-[3.438rem] leading-[2.5rem] md:leading-[3.75rem] lg:leading-[5.156rem] font-inter-bold text-black-core/[0.87]">
<div className="flex flex-col items-center xl:items-start xl:mb-20 xl:w-3/5 2xl:w-2/4">
<p className="text-center xl:text-left text-3xl md:text-[2.813rem] lg:text-[3.438rem] leading-10 md:leading-[3.75rem] lg:leading-[5.156rem] font-inter-bold text-black-core/[0.87]">
Want to build a new version of your existing app or add new
features?
</p>
<p className="mt-4 text-[1rem] md:text-[1.25rem] leading-[1.5rem] md:leading-[1.875rem] font-inter-medium text-center xl:text-left text-black-core/[0.87] lg:text-black-core/[0.60]">
<p className="mt-4 text-base md:text-xl md:leading-[1.875rem] font-inter-medium text-center xl:text-left text-black-core/[0.87] lg:text-black-core/[0.60]">
Not sure where to start? We also offer code and architecture
reviews, strategic planning, and more.
</p>
<Link
href={`${config.WEBSITE_URL}/contact`}
className="relative justify-self-center mt-6 rounded-full border-[1px] border-solid border-transparent bg-gradient-to-r from-[#f2709c] to-[#ff9472] hover:shadow-[inset_2px_1000px_1px_#fff] font-inter-semibold text-white"
className="relative justify-self-center mt-6 rounded-full border border-solid border-transparent bg-gradient-to-r from-[#f2709c] to-[#ff9472] hover:shadow-[inset_2px_1000px_1px_#fff] font-inter-semibold text-white"
>
<div className="py-[0.8rem] px-[1.5rem] text-[1.188rem] leading-[1.425rem] md:text-[1.09375rem] md:leading-[1.3125rem] lg:text-[1.1875rem] lg:leading-[1.4375rem] tracking-normal hoverable-text inline-block">
<div className="py-[0.8rem] px-6 text-[1.188rem] leading-[1.425rem] md:text-[1.09375rem] md:leading-[1.3125rem] lg:text-[1.1875rem] lg:leading-[1.4375rem] tracking-normal hoverable-text inline-block">
Talk to our experts
</div>
</Link>
</div>
<div className="hidden xl:block relative w-[53%] xl:w-[40%] 2xl:w-[50%]">
<div className="hidden xl:block relative w-[53%] xl:w-2/5 2xl:w-1/2">
<Image
src={cta800w}
loading="lazy"
Expand Down Expand Up @@ -100,11 +100,11 @@ export default function CTA() {
className="cursor-pointer"
>
<div
className={`flex flex-col items-center rounded-[16px] bg-gradient-to-r from-[#FF835B]/[0.3] to-[#F2709C]/[0.3] w-[50%] p-[20px] h-[140px] ${
className={`flex flex-col items-center rounded-2xl bg-gradient-to-r from-[#FF835B]/[0.3] to-[#F2709C]/[0.3] w-1/2 p-5 h-[140px] ${
slide.hasStar ? "justify-between" : "justify-center"
}`}
>
<span className="font-inter-bold text-[1.5rem] leading-[2.25rem]">
<span className="font-inter-bold text-[1.5rem] leading-9">
{slide.title}
</span>
<span className="font-inter-medium text-[1.1875rem] leading-[1.78125rem] text-black-core/[0.6]">
Expand Down
Loading

0 comments on commit c608bc8

Please sign in to comment.