-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
1,303 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,7 +32,7 @@ const config = { | |
i18n: { | ||
defaultLocale: "en", | ||
locales: [ | ||
"en" | ||
"en" | ||
], | ||
}, | ||
markdown: { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
.badge { | ||
padding: .3em .6em; | ||
border-radius: 1em; | ||
padding: .3rem .6rem; | ||
border-radius: 1rem; | ||
color: var(--svgo-pill-fg-color); | ||
background-color: var(--svgo-pill-bg-color); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,76 @@ | ||
import React from 'react'; | ||
import clsx from 'clsx'; | ||
import styles from './index.module.css'; | ||
import UndrawMountain from '../../vectors/undraw_mountain.svg'; | ||
import UndrawReact from '../../vectors/undraw_react.svg'; | ||
import UndrawTree from '../../vectors/undraw_tree.svg'; | ||
import SvgoHackerman from '../../vectors/svgo_hackerman.svg'; | ||
import SvgoIntegrations from '../../vectors/svgo_integrations.svg'; | ||
import SvgoOss from '../../vectors/svgo_oss.svg'; | ||
|
||
const FeatureList = [ | ||
{ | ||
title: 'Easy to Use', | ||
Svg: UndrawMountain, | ||
Svg: SvgoHackerman, | ||
description: ( | ||
<> | ||
Easy to use through both the command-line interface and JavaScript | ||
API. | ||
SVGO can be used through both the command-line interface and JavaScript | ||
API, with help pages and documentation available for both. | ||
</> | ||
), | ||
}, | ||
{ | ||
title: 'Integrations', | ||
Svg: UndrawTree, | ||
Svg: SvgoIntegrations, | ||
description: ( | ||
<> | ||
Many applications and frameworks depend on or have supported integrations | ||
for SVGO already, like Docusaurus and Webpack. | ||
Many libraries, frameworks, or tools bundle or have integrations available | ||
for SVGO already, like Docusaurus, PostCSS, and webpack. | ||
</> | ||
), | ||
}, | ||
{ | ||
title: 'Open-Source', | ||
Svg: UndrawReact, | ||
Svg: SvgoOss, | ||
description: ( | ||
<> | ||
We welcome contributions, so feel free to join us on GitHub! | ||
We welcome contributions! Feel free to to file a bug report, feature | ||
request, or open pull requests on GitHub. | ||
</> | ||
), | ||
) | ||
}, | ||
]; | ||
|
||
function Feature({Svg, title, description}) { | ||
function Feature({ Svg, title, description }) { | ||
return ( | ||
<div className={clsx('card', styles.feature)}> | ||
<div className="text--center"> | ||
<Svg className={styles.featureSvg} role="img" aria-hidden="true"/> | ||
</div> | ||
<div className="text--center padding-horiz--md"> | ||
<h2>{title}</h2> | ||
<p>{description}</p> | ||
<div className={clsx(styles.featureWrapper)}> | ||
<div className={clsx(styles.featureBackground)}></div> | ||
<div className={clsx(styles.feature)}> | ||
<div className="text--center"> | ||
<Svg className={clsx(styles.featureSvg)} role="img" aria-hidden="true" /> | ||
</div> | ||
<div className={clsx(styles.featureText, "padding-horiz--md")}> | ||
<h2 className={clsx(styles.featureTitle)}>{title}</h2> | ||
<p className={clsx(styles.featureDescription)}>{description}</p> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
} | ||
|
||
export default function HomepageFeatures() { | ||
return ( | ||
<section className={styles.features}> | ||
{FeatureList.map((props, idx) => ( | ||
<Feature key={idx} {...props} /> | ||
))} | ||
</section> | ||
<> | ||
<svg height="0" width="0"> | ||
<clipPath id="featureMobilePath" clipPathUnits="objectBoundingBox"> | ||
<path d="M 0 .4 Q .4 .2 1 .1 V 1 H 0" /> | ||
</clipPath> | ||
<clipPath id="featureDesktopPath" clipPathUnits="objectBoundingBox"> | ||
<path d="M 0 .25 Q .2 -.1 .4 .1 T .8 .2 1 0 V 1 H 0" /> | ||
</clipPath> | ||
</svg> | ||
<section className={clsx(styles.features)}> | ||
{FeatureList.map((props, idx) => ( | ||
<Feature key={idx} {...props} /> | ||
))} | ||
</section> | ||
</> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,82 @@ | ||
.features { | ||
display: flex; | ||
flex-wrap: wrap; | ||
flex-direction: column; | ||
align-items: center; | ||
} | ||
|
||
.featureWrapper { | ||
margin-top: -4rem; | ||
padding: 4rem 1rem 4rem 1rem; | ||
position: relative; | ||
width: 100%; | ||
display: flex; | ||
justify-content: center; | ||
align-items: stretch; | ||
padding: 2rem 0; | ||
margin: -1em .5em; | ||
} | ||
|
||
.featureWrapper:nth-child(2) .feature { | ||
flex-direction: row-reverse; | ||
} | ||
|
||
.feature { | ||
width: 360px; | ||
max-width: 360px; | ||
margin: 1em; | ||
max-width: var(--svgo-global-width); | ||
width: 100%; | ||
justify-content: space-around; | ||
} | ||
|
||
.featureBackground::after { | ||
content: ""; | ||
top: 0; | ||
left: 0; | ||
z-index: -1; | ||
height: 100%; | ||
width: calc(100vw - (100vw - 100%)); | ||
position: absolute; | ||
background: linear-gradient(to bottom, #367fc126, #39aee400); | ||
clip-path: url(#featureMobilePath); | ||
} | ||
|
||
@media (prefers-color-scheme: dark) { | ||
.featureBackground::after { | ||
background: linear-gradient(to bottom, #39aee440, #39aee400); | ||
} | ||
} | ||
|
||
.featureWrapper:nth-child(2) .featureBackground::after { | ||
transform: scaleX(-1); | ||
} | ||
|
||
.featureText { | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
} | ||
|
||
.featureTitle { | ||
font-size: 2rem; | ||
font-weight: 700; | ||
} | ||
|
||
.featureDescription { | ||
font-size: 1.4rem; | ||
} | ||
|
||
.featureSvg { | ||
height: 200px; | ||
width: 200px; | ||
max-height: 250px; | ||
margin-bottom: 2rem; | ||
} | ||
|
||
@media (min-width: 997px) { | ||
.featureBackground::after { | ||
clip-path: url(#featureDesktopPath); | ||
} | ||
|
||
.feature { | ||
display: flex; | ||
flex-direction: row; | ||
} | ||
|
||
.featureSvg { | ||
height: 350px; | ||
max-height: 350px; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
.leftMargin { | ||
margin-left: 1em; | ||
margin-left: 1rem; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.