Skip to content

Commit

Permalink
Merge pull request #141 from TowerOneka/style-fixes
Browse files Browse the repository at this point in the history
Style fixes home page
  • Loading branch information
ukorvl authored Dec 15, 2023
2 parents 763184f + 79a34bf commit ac03b36
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 11 deletions.
11 changes: 9 additions & 2 deletions site/src/components/common/HeadingSection/HeadingSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@ import { headingIcons } from './data'

import s from './HeadingSection.module.scss'

function HeadingSection({ className, title, description, socials }: InferProps<typeof HeadingSection.propTypes>) {
function HeadingSection({
className,
descriptionClassName,
title,
description,
socials,
}: InferProps<typeof HeadingSection.propTypes>) {
const getIcons = useMemo(
() =>
headingIcons[socials as keyof typeof headingIcons]?.map((el) => (
Expand All @@ -20,14 +26,15 @@ function HeadingSection({ className, title, description, socials }: InferProps<t
return (
<div className={cx(s.root, className)}>
<h2 className={s.title}>{title}</h2>
{description && <p className={s.description}>{description}</p>}
{description && <p className={cx(s.description, descriptionClassName)}>{description}</p>}
{socials && <div className={s.icons}>{getIcons}</div>}
</div>
)
}

HeadingSection.propTypes = {
className: string,
descriptionClassName: string,
title: string.isRequired,
description: string,
socials: oneOf(['community', 'corporate']),
Expand Down
9 changes: 6 additions & 3 deletions site/src/components/pages/Home/ZkProof/ZkProof.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
padding-bottom: size($spacing64);

@include mobile {
padding-bottom: 0;
padding-top: size($spacing48);
}
}
Expand Down Expand Up @@ -78,9 +77,13 @@
.box {
&:not(:last-child) {
margin-bottom: size($spacing64);

@include mobile {
margin-bottom: size($spacing24);
}
}

@include mobile {
margin-bottom: unset;
&:last-of-type {
margin-bottom: 0;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,12 @@
}
}

.headingDescription {
@include mobile {
width: auto;
}
}

.rightHeader {
display: flex;

Expand Down
7 changes: 6 additions & 1 deletion site/src/components/pages/ZkSharding/Cherries/Cherries.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@ const Cherries = ({ data: { title, description, content }, className }: Props) =
<div className={cx(s.root, className)}>
<div className={s.left}>
<WhiteRectangle />
<HeadingSection className={s.heading} title={title} description={description} />
<HeadingSection
className={s.heading}
descriptionClassName={s.headingDescription}
title={title}
description={description}
/>
{!isMobile && <WhiteRectangle />}
</div>

Expand Down
10 changes: 6 additions & 4 deletions site/src/components/pages/ZkSharding/More/More.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,6 @@
align-items: center;
}

.description {
color: $grey;
}

.heading {
min-height: unset;

Expand Down Expand Up @@ -145,6 +141,12 @@
}
}

.description {
@include mobile {
width: auto;
}
}

.list {
display: flex;
flex-wrap: wrap;
Expand Down
7 changes: 6 additions & 1 deletion site/src/components/pages/ZkSharding/More/More.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@ const More = ({ data: { title, description, contentFooter, footer }, className }
<div className={cx(s.root, className)}>
<div className={s.left}>
<WhiteRectangle />
<HeadingSection className={s.heading} title={title} description={description} />
<HeadingSection
className={s.heading}
descriptionClassName={s.description}
title={title}
description={description}
/>
{!isMobile && <WhiteRectangle />}
</div>

Expand Down

0 comments on commit ac03b36

Please sign in to comment.