Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: reduce company logo size on casestudy/[id] page #2728

Merged
merged 14 commits into from
Mar 11, 2024
18 changes: 8 additions & 10 deletions pages/casestudies/[id].js
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ import GenericLayout from "../../components/layout/GenericLayout";
import CaseTOC from "../../components/CaseTOC";
import { generateCaseStudyContent } from "../../lib/staticHelpers";

const renderContent = (content, allComponents, level) => {
const renderContent = (content, allComponents, level, isAgain=false) => {
RamGoel marked this conversation as resolved.
Show resolved Hide resolved
const typeStyle =
level === 0 ? "heading-lg" : level === 1 ? "heading-md" : "heading-sm";

return content.map((item) => {
return (
<div
className="mt-10"
className={`mt-10 mx-auto ${!isAgain?'w-11/12':''}`}
Copy link
Member

@sambhavgupta0705 sambhavgupta0705 Mar 7, 2024

Choose a reason for hiding this comment

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

@RamGoel I am not able to understand the use of isAgain
So please remove it

key={item.title}
>
<Heading typeStyle={typeStyle} className="mt-8" id={item.title
Expand All @@ -44,7 +44,7 @@ const renderContent = (content, allComponents, level) => {
))}
</div>
{item.children &&
renderContent(item.children, allComponents, level + 1)}
renderContent(item.children, allComponents, level + 1, true)}
</div>
)}
</div>
Expand Down Expand Up @@ -143,9 +143,9 @@ function Index({
wide
>
<div className="max-w-screen lg:flex-row-reverse lg:flex lg:justify-between">
<CaseTOC toc={content} cssBreakingPoint="lg" className="lg:flex-1 bg-blue-100 mt-4 p-4 sticky top-20 overflow-y-auto max-h-screen lg:bg-transparent lg:mt-2 lg:pt-0 lg:pb-8 lg:top-24 lg:max-h-(screen-16) lg:border-l lg:border-gray-200 lg:min-w-[265px] lg:max-w-72 lg:-mr-14" />
<div className="px-4 sm:px-6 xl:px-0 lg:flex-1 lg:max-w-[812px] xl:max-w-5xl case-study">
<div className="mt-10 md:mt-20 flex flex-col md:flex-row justify-between items-center">
<CaseTOC toc={content} cssBreakingPoint="lg" className="lg:flex-1 bg-blue-100 mt-4 p-4 sticky top-20 overflow-y-auto max-h-screen lg:bg-transparent lg:mt-2 lg:pt-0 lg:pb-8 lg:top-24 lg:max-h-(screen-16) lg:border-l lg:border-gray-200 lg:min-w-[200px] lg:max-w-72 lg:-mr-0" />
<div className="xl:max-w-5xl case-study">
<div className=" mt-10 md:mt-20 flex flex-col md:flex-row justify-between items-center w-11/12 mx-auto">
<div className="w-full md:w-[65%]">
<Heading typeStyle="heading-xl" className="countdown-text-gradient">
{casestudy.company.name}
Expand Down Expand Up @@ -189,13 +189,11 @@ function Index({
</Heading>
</div>
</div>
<div className="mt-10 md:mt-0">
<img
<img
src={casestudy.company.logo}
alt={casestudy.company.name}
className="w-[350px] rounded-lg"
className="w-[250px] mt-5 md:mt-0 mx-auto rounded-lg"
/>
</div>
</div>
{renderContent(content, allComponents, 0)}
</div>
Expand Down
Loading