Skip to content

Commit

Permalink
docs(website): home page styling (#4246)
Browse files Browse the repository at this point in the history
  • Loading branch information
IrbisKronos authored Nov 1, 2023
1 parent 6e87dc1 commit 8e7af5e
Show file tree
Hide file tree
Showing 12 changed files with 173 additions and 99 deletions.
11 changes: 6 additions & 5 deletions website/src/components/Homepage/Features/Features.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import React from 'react';
import './Features.scss';
import styles from './Features.module.scss';
import clsx from 'clsx';

const Features = ({ Svg, title, description }) => {
return (
<div className="col col--4 features-gap">
<Svg className="feature-image" alt={title} />
<div className={clsx('col col--4', styles.featuresGap)}>
<Svg className={styles.featureImage} alt={title} />
<div>
<h3>{title}</h3>
<p>{description}</p>
<h3 className={styles.featureTitle}>{title}</h3>
<p className={styles.featureText}>{description}</p>
</div>
</div>
);
Expand Down
52 changes: 52 additions & 0 deletions website/src/components/Homepage/Features/Features.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
@import '@site/src/css/fonts';

.featuresGap {
--ifm-col-width: calc(1 / 3 * 100%);
margin-bottom: 91px;
}

.featureImage {
height: 60px;
width: 60px;
margin-bottom: 18px;
}

.featureTitle {
@include h5;
margin-bottom: 14px;
letter-spacing: -0.2px;
}

.featureText {
@include t2;
max-width: 256px;
}

@media only screen and (max-width: 996px) {
.featuresGap {
--ifm-col-width: 50%;
}
}

@media only screen and (max-width: 500px) {
.featuresGap {
--ifm-col-width: 100%;

margin-bottom: 29px;
padding-left: 25px;
}

.featureImage {
height: 45px;
width: 45px;
margin-bottom: 7px;
}

.featureTitle {
margin-bottom: 11px;
}

.featureText {
max-width: 290px;
}
}
9 changes: 0 additions & 9 deletions website/src/components/Homepage/Features/Features.scss

This file was deleted.

5 changes: 3 additions & 2 deletions website/src/components/Homepage/Features/HomepageFeatures.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import React from 'react';
import styles from './HomepageFeatures.module.scss';
import clsx from 'clsx';
import FeatureList from './FeatureList';
import Features from './Features';

const HomepageFeatures = () => {
return (
<section>
<div className="container">
<div className={clsx('container', styles.benefitsHeader)}>
<div className="row">
<div className="col">
<h1 className={styles.benefitsHeader}>Detox benefits</h1>
<h1 className={styles.benefitsTitle}>Detox benefits</h1>
</div>
</div>
<div className="row">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
@import '@site/src/css/fonts';

.benefitsHeader {
font-family: 'Nunito Sans', sans-serif;
font-style: normal;
font-weight: 700;
font-size: 58px;
line-height: 70px;
color: #131419;
margin-top: 125px;
margin-bottom: 125px;
margin-left: -5px;
}
margin-bottom: 24px;

[data-theme='dark'] .benefitsHeader {
color: #ffffff;
@media only screen and (max-width: 1200px) {
--ifm-spacing-horizontal: 1.625rem;
}
}

.benefitsTitle {
@include h2;
color: var(--ifm-heading-color);
margin-top: 136px;
margin-bottom: 104px;
margin-left: -5px;

@media only screen and (max-width: 500px) {
font-size: 40px;
margin-top: 47px;
margin-bottom: 30px;
}
}
21 changes: 12 additions & 9 deletions website/src/components/Homepage/Header/HomepageHeader.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
--ifm-heading-color: #fff;

width: 100%;
height: calc(366px + 22vw);
padding: 54px 10px;
height: calc(357px + 23vw);
padding-top: 54px;
min-height: 450px;
max-height: 725px;
overflow: hidden;
Expand All @@ -24,8 +24,13 @@
background-size: 1100px;
}

@media only screen and (max-width: 870px) {
padding: 32px 9px;
@media only screen and (max-width: 890px) {
padding-top: 32px;
padding-bottom: 32px;
}

@media only screen and (max-width: 1200px) {
--ifm-spacing-horizontal: 1.625rem;
}

@media only screen and (min-width: 1600px) {
Expand All @@ -42,7 +47,7 @@
letter-spacing: -6px;
margin-left: -10px;

@media only screen and (max-width: 870px) {
@media only screen and (max-width: 890px) {
font-size: 72px;
line-height: normal;
letter-spacing: -3.6px;
Expand All @@ -52,14 +57,13 @@

.tagline {
@include t1;

max-width: 450px;
min-height: 60px;
margin-top: -30px;
margin-bottom: 32px;
letter-spacing: 0.1px;

@media only screen and (max-width: 870px) {
@media only screen and (max-width: 890px) {
margin-top: -22px;
margin-bottom: 21px;
}
Expand All @@ -71,8 +75,7 @@

.linkText {
@include t2;

font-family: 'Poppins';
font-size: 17px;
color: var(--ifm-color-gray-900);
background-color: var(--ifm-button-background-color);
min-width: 250px;
Expand Down
53 changes: 29 additions & 24 deletions website/src/components/Homepage/SubHeader/HomepageSubHeader.js
Original file line number Diff line number Diff line change
@@ -1,32 +1,37 @@
import React from 'react';
import clsx from 'clsx';
import styles from './HomepageSubHeader.module.scss';

const HomepageSubHeader = () => {
return (
<div className={styles.subHeader}>
<div className={styles.callToAction}>
<span>
Follow us on <strong>social networks:</strong>
</span>
return (<div className={styles.subHeaderWrapper}>
<div className='container'>
<div className='row'>
<div className={clsx('col', styles.subHeader)}>
<div className={styles.callToAction}>
<span>
Follow&nbsp;us&nbsp;on <strong>social&nbsp;networks:</strong>
</span>
</div>
<div className={styles.socialNetworks}>
<a className={styles.discordButton} href='https://discord.gg/CkD5QKheF5' target='_blank'></a>
<a className={styles.twitterButton} href='https://x.com/detoxe2e?s=20' target='_blank'>
<span className={styles.twitterLogo}></span>
<span className={styles.twitterFollowText}>Follow </span>
<span className={styles.twitterFollowId}>@detoxe2e</span>
</a>
<a className={styles.twitterCounter} href='https://x.com/detoxe2e?s=20' target='_blank'>
<span>486</span>
<span>&nbsp;followers</span>
</a>
<a className={styles.githubButton} href='https://github.com/wix/detox' target='_blank'></a>
<a className={styles.githubCounter} href='https://github.com/wix/detox/stargazers' target='_blank'>
<span>10,598</span>
</a>
</div>
</div>
</div>
</div>
<div className={styles.socialNetworks}>
<a className={styles.discordButton} href="https://discord.gg/CkD5QKheF5" target="_blank"></a>
<a className={styles.twitterButton} href="https://x.com/detoxe2e?s=20" target="_blank">
<span className={styles.twitterLogo}></span>
<span className={styles.twitterFollowText}>Follow </span>
<span className={styles.twitterFollowId}>@detoxe2e</span>
</a>
<a className={styles.twitterCounter} href="https://x.com/detoxe2e?s=20" target="_blank">
<span>486</span>
<span>&nbsp;followers</span>
</a>
<a className={styles.githubButton} href="https://github.com/wix/detox" target="_blank"></a>
<a className={styles.githubCounter} href="https://github.com/wix/detox/stargazers" target="_blank">
<span>10,598</span>
</a>
</div>
</div>
);
</div>);
};

export default HomepageSubHeader;
Original file line number Diff line number Diff line change
@@ -1,41 +1,52 @@
.subHeader {
@import '@site/src/css/fonts';

.subHeaderWrapper {
background-color: #171b20;
color: var(--primary-dark-a-0, #FFF);
font-family: 'Nunito Sans', sans-serif;
font-style: normal;
font-weight: 300;
font-size: 24px;
width: 100%;
color: #fff;

@media only screen and (max-width: 1200px) {
--ifm-spacing-horizontal: 1.625rem;
}
}

.subHeader {
min-height: 85px;
display: flex;
flex-wrap: wrap;
justify-content: space-around;
padding: 0 var(--ifm-spacing-horizontal);
justify-content: space-between;
}

.callToAction {
color: var(--primary-dark-a-0, #FFF);
@include h5;
font-weight: 300;
line-height: 35px;
color: #fff;
display: flex;
align-items: center;
margin-right: 10px;
flex-wrap: nowrap;

@media only screen and (max-width: 600px) {
@media only screen and (max-width: 570px) {
font-size: 18px;
line-height: 24px;
line-height: 25px;
}

@media only screen and (max-width: 480px) {
max-width: 140px;
margin-top: 20px;
margin-top: 16px;
align-items: normal;
}

@media only screen and (max-width: 370px) {
letter-spacing: -1px;
}
}

.socialNetworks {
display: flex;
align-items: center;
margin: 20px 0;
@include t2;
}

.discordButton {
Expand All @@ -58,6 +69,7 @@
display: inline-block;
background-color: #1E9EEE;
height: 45px;
line-height: 45px;
width: 199px;
border-radius: 10px;
margin-right: 10px;
Expand All @@ -77,8 +89,7 @@

.twitterFollowText,
.twitterFollowId {
color: var(--primary-dark-a-0, #FFF);
font-size: 16px;
color: #fff;
}

.twitterFollowText {
Expand All @@ -93,10 +104,8 @@
align-items: center;
justify-content: center;
border-radius: 5px;
background: var(--primary-dark-a-4, #313439);
color: var(--primary-dark-a-0, #FFF);
font-size: 16px;
line-height: 25px;
background: #313439;
color: #fff;

@media only screen and (max-width: 1100px) {
display: none;
Expand All @@ -119,10 +128,8 @@
align-items: center;
justify-content: center;
border-radius: 5px;
background: var(--primary-dark-a-4, #313439);
color: var(--primary-dark-a-0, #FFF);
font-size: 16px;
line-height: 25px;
background: #313439;
color: #fff;

@media only screen and (max-width: 950px) {
display: none;
Expand Down Expand Up @@ -155,9 +162,9 @@
}
}

@media only screen and (max-width: 870px) {
@media only screen and (max-width: 890px) {
.discordButton {
margin-right: 5px;
margin-right: 10px;
}

.twitterButton {
Expand All @@ -170,9 +177,11 @@
}
}

@media only screen and (max-width: 750px) {
@media only screen and (max-width: 780px) {
.subHeader {
padding: 10px var(--ifm-spacing-horizontal);
padding-top: 10px;
padding-bottom: 10px;

}

.discordButton,
Expand Down
Loading

0 comments on commit 8e7af5e

Please sign in to comment.