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

Fix: update mobile submission and feedback count alignment #1289

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 13 additions & 17 deletions src/components/sections/communities/overview/MainHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,30 +19,26 @@ export default function CommunitySection(): ReactElement {
const feedbacks = community?.metadata?.feedbacks || 0;

return (
<Section className="bg-theme-primary text-theme-text">
<div className="py-2 md:py-8 mx-auto">
<Section padding="pt-8 pb-6 lg:pt-12 lg:pb-16" className="bg-theme-primary text-theme-text">
<div className="mx-auto relative">
<div className="flex flex-col justify-between lg:flex-row">
<div className="max-w-md mb-4 md:max-w-md lg:max-w-lg xl:max-w-xl 2xl:max-w-2xl lg:mr-6">
<div className="max-w-md mb-4 md:max-w-md lg:max-w-lg xl:max-w-xl 2xl:max-w-2xl lg:mr-6 space-y-1.5 md:space-y-7">
<h1 className="text-5xl leading-10 sm:text-6.5xl xl:text-7.75xl max-w-text-xs -tracking-4">{community?.name}</h1>
<p className="mt-8 text-lg leading-5.5 lg:hidden">{community?.summary}</p>
<p className="hidden mt-4 text-lg leading-6 font-extralight lg:block">{community?.summary}</p>
<p className="text-xl md:text-.5xl">{community?.summary}</p>
</div>
<div className="self-end w-36 md:h-82 lg:h-128 md:w-1/2 max-w-lg">
{community?.icon && <Image src={`${community?.icon}`} alt={community?.name || ""} className="relative w-full h-full" width={300} height={300} />}
</div>
</div>
<div className="flex flex-col max-w-xs mt-0 sm:-mt-15 lg:-mt-8 md:max-w-xl lg:flex-row lg:items-center">
<div className="my-2 text-sm">
<span>
<strong>{submissions} </strong>
{t("communities.submissions")}
</span>
<span className="p-2 md:border-l md:ml-2">
<strong>{feedbacks} </strong>
{t("communities.feedbacks")}
</span>
<div />
</div>
<div className="absolute left-0 bottom-0 md:static flex flex-col md:flex-row md:items-center text-sm gap-1 md:gap-2.5">
<p className="md:py-2">
<strong>{submissions} </strong>
{t("communities.submissions")}
</p>
<p className="md:py-2 md:border-l md:px-2.5">
<strong>{feedbacks} </strong>
{t("communities.feedbacks")}
</p>
</div>
</div>
</Section>
Expand Down