prettier/website/pages/en/index.js

480 lines
13 KiB
JavaScript
Raw Normal View History

"use strict";
const React = require("react");
2018-07-01 16:59:20 +03:00
const PropTypes = require("prop-types");
const CompLibrary = require("../../core/CompLibrary.js");
Revamp landing page (#3718) * Begin landing page revamp * Break the editor integrations onto their own lines * Add template string * Add editor line breaks * Make logo clickable * Add more docs links * Don’t split the editor list items into paragraphs * Break plugin onto its own line * Move the “Why” button to the bottom of the block * Use suggested font * Change font * Change footer color * Add assets from @orta * Fix fonts * Use new editor assets * Add npm/yarn button * Switch to npx * Minor mobile tweaks * Add dependants * Lots of zeros are cooler to look at than a “k” * Improve button sizes, respect prefers-reduced-motion * Fixup media breakpoints for Get Started section * Increase padding of editors * CSS fixes from code review * Prevent repeatedly clicking on the logo from selecting nearby text * dependant -> dependent * Various CSS tightening * Set flex-basis on editors * Add new languages panel * Improve layout of languages * Cleanup grouping code * Fix users layout * Fix language image widths * space-evenly -> space-between * Fix typo * Remove unused var * Various CSS fixes * Set overflow-x: auto on code * Improve languages layout * Add silly cursor * Make logo 'draggable' * [Site] Margins and paddings (#2) * [Site] Margins and paddings * [Site] Bring back the link to why, that's a good guide worth linking to * Improve logo mobile usage * Improve responsive layout of editors * Use static SVG for the moment (#3) * Use the static logo for the moment * Fix the broken JS, from going static, and make overscroll the right color * Fix padding
2018-02-06 12:52:39 +03:00
const MarkdownBlock = CompLibrary.MarkdownBlock;
const Container = CompLibrary.Container;
const AnimatedLogo = require("@sandhose/prettier-animated-logo");
const siteConfig = require(process.cwd() + "/siteConfig.js");
Revamp landing page (#3718) * Begin landing page revamp * Break the editor integrations onto their own lines * Add template string * Add editor line breaks * Make logo clickable * Add more docs links * Don’t split the editor list items into paragraphs * Break plugin onto its own line * Move the “Why” button to the bottom of the block * Use suggested font * Change font * Change footer color * Add assets from @orta * Fix fonts * Use new editor assets * Add npm/yarn button * Switch to npx * Minor mobile tweaks * Add dependants * Lots of zeros are cooler to look at than a “k” * Improve button sizes, respect prefers-reduced-motion * Fixup media breakpoints for Get Started section * Increase padding of editors * CSS fixes from code review * Prevent repeatedly clicking on the logo from selecting nearby text * dependant -> dependent * Various CSS tightening * Set flex-basis on editors * Add new languages panel * Improve layout of languages * Cleanup grouping code * Fix users layout * Fix language image widths * space-evenly -> space-between * Fix typo * Remove unused var * Various CSS fixes * Set overflow-x: auto on code * Improve languages layout * Add silly cursor * Make logo 'draggable' * [Site] Margins and paddings (#2) * [Site] Margins and paddings * [Site] Bring back the link to why, that's a good guide worth linking to * Improve logo mobile usage * Improve responsive layout of editors * Use static SVG for the moment (#3) * Use the static logo for the moment * Fix the broken JS, from going static, and make overscroll the right color * Fix padding
2018-02-06 12:52:39 +03:00
const ButtonGroup = props => (
<div className="buttonGroup buttonWrapper">{props.children}</div>
);
ButtonGroup.propTypes = {
2018-07-01 16:59:20 +03:00
children: PropTypes.node
Revamp landing page (#3718) * Begin landing page revamp * Break the editor integrations onto their own lines * Add template string * Add editor line breaks * Make logo clickable * Add more docs links * Don’t split the editor list items into paragraphs * Break plugin onto its own line * Move the “Why” button to the bottom of the block * Use suggested font * Change font * Change footer color * Add assets from @orta * Fix fonts * Use new editor assets * Add npm/yarn button * Switch to npx * Minor mobile tweaks * Add dependants * Lots of zeros are cooler to look at than a “k” * Improve button sizes, respect prefers-reduced-motion * Fixup media breakpoints for Get Started section * Increase padding of editors * CSS fixes from code review * Prevent repeatedly clicking on the logo from selecting nearby text * dependant -> dependent * Various CSS tightening * Set flex-basis on editors * Add new languages panel * Improve layout of languages * Cleanup grouping code * Fix users layout * Fix language image widths * space-evenly -> space-between * Fix typo * Remove unused var * Various CSS fixes * Set overflow-x: auto on code * Improve languages layout * Add silly cursor * Make logo 'draggable' * [Site] Margins and paddings (#2) * [Site] Margins and paddings * [Site] Bring back the link to why, that's a good guide worth linking to * Improve logo mobile usage * Improve responsive layout of editors * Use static SVG for the moment (#3) * Use the static logo for the moment * Fix the broken JS, from going static, and make overscroll the right color * Fix padding
2018-02-06 12:52:39 +03:00
};
class Button extends React.Component {
render() {
return (
<div className="pluginWrapper buttonWrapper">
<a className="button" href={this.props.href} target={this.props.target}>
{this.props.children}
</a>
</div>
);
}
}
Button.defaultProps = {
target: "_self"
};
Button.propTypes = {
2018-07-01 16:59:20 +03:00
href: PropTypes.string,
target: PropTypes.string,
children: PropTypes.any
};
2019-05-13 22:21:45 +03:00
function Tidelift() {
return (
<a className="tidelift" href={siteConfig.tideliftUrl}>
2019-05-13 22:33:30 +03:00
GET PROFESSIONALLY SUPPORTED PRETTIER
2019-05-13 22:21:45 +03:00
</a>
);
}
Revamp landing page (#3718) * Begin landing page revamp * Break the editor integrations onto their own lines * Add template string * Add editor line breaks * Make logo clickable * Add more docs links * Don’t split the editor list items into paragraphs * Break plugin onto its own line * Move the “Why” button to the bottom of the block * Use suggested font * Change font * Change footer color * Add assets from @orta * Fix fonts * Use new editor assets * Add npm/yarn button * Switch to npx * Minor mobile tweaks * Add dependants * Lots of zeros are cooler to look at than a “k” * Improve button sizes, respect prefers-reduced-motion * Fixup media breakpoints for Get Started section * Increase padding of editors * CSS fixes from code review * Prevent repeatedly clicking on the logo from selecting nearby text * dependant -> dependent * Various CSS tightening * Set flex-basis on editors * Add new languages panel * Improve layout of languages * Cleanup grouping code * Fix users layout * Fix language image widths * space-evenly -> space-between * Fix typo * Remove unused var * Various CSS fixes * Set overflow-x: auto on code * Improve languages layout * Add silly cursor * Make logo 'draggable' * [Site] Margins and paddings (#2) * [Site] Margins and paddings * [Site] Bring back the link to why, that's a good guide worth linking to * Improve logo mobile usage * Improve responsive layout of editors * Use static SVG for the moment (#3) * Use the static logo for the moment * Fix the broken JS, from going static, and make overscroll the right color * Fix padding
2018-02-06 12:52:39 +03:00
const HomeSplash = props => {
return (
<div className="homeContainer">
2019-05-13 22:21:45 +03:00
<Tidelift />
Revamp landing page (#3718) * Begin landing page revamp * Break the editor integrations onto their own lines * Add template string * Add editor line breaks * Make logo clickable * Add more docs links * Don’t split the editor list items into paragraphs * Break plugin onto its own line * Move the “Why” button to the bottom of the block * Use suggested font * Change font * Change footer color * Add assets from @orta * Fix fonts * Use new editor assets * Add npm/yarn button * Switch to npx * Minor mobile tweaks * Add dependants * Lots of zeros are cooler to look at than a “k” * Improve button sizes, respect prefers-reduced-motion * Fixup media breakpoints for Get Started section * Increase padding of editors * CSS fixes from code review * Prevent repeatedly clicking on the logo from selecting nearby text * dependant -> dependent * Various CSS tightening * Set flex-basis on editors * Add new languages panel * Improve layout of languages * Cleanup grouping code * Fix users layout * Fix language image widths * space-evenly -> space-between * Fix typo * Remove unused var * Various CSS fixes * Set overflow-x: auto on code * Improve languages layout * Add silly cursor * Make logo 'draggable' * [Site] Margins and paddings (#2) * [Site] Margins and paddings * [Site] Bring back the link to why, that's a good guide worth linking to * Improve logo mobile usage * Improve responsive layout of editors * Use static SVG for the moment (#3) * Use the static logo for the moment * Fix the broken JS, from going static, and make overscroll the right color * Fix padding
2018-02-06 12:52:39 +03:00
<div className="homeSplashFade">
<div className="wrapper homeWrapper">
<div className="animatedLogoWrapper">
<AnimatedLogo version="wide" />
Revamp landing page (#3718) * Begin landing page revamp * Break the editor integrations onto their own lines * Add template string * Add editor line breaks * Make logo clickable * Add more docs links * Don’t split the editor list items into paragraphs * Break plugin onto its own line * Move the “Why” button to the bottom of the block * Use suggested font * Change font * Change footer color * Add assets from @orta * Fix fonts * Use new editor assets * Add npm/yarn button * Switch to npx * Minor mobile tweaks * Add dependants * Lots of zeros are cooler to look at than a “k” * Improve button sizes, respect prefers-reduced-motion * Fixup media breakpoints for Get Started section * Increase padding of editors * CSS fixes from code review * Prevent repeatedly clicking on the logo from selecting nearby text * dependant -> dependent * Various CSS tightening * Set flex-basis on editors * Add new languages panel * Improve layout of languages * Cleanup grouping code * Fix users layout * Fix language image widths * space-evenly -> space-between * Fix typo * Remove unused var * Various CSS fixes * Set overflow-x: auto on code * Improve languages layout * Add silly cursor * Make logo 'draggable' * [Site] Margins and paddings (#2) * [Site] Margins and paddings * [Site] Bring back the link to why, that's a good guide worth linking to * Improve logo mobile usage * Improve responsive layout of editors * Use static SVG for the moment (#3) * Use the static logo for the moment * Fix the broken JS, from going static, and make overscroll the right color * Fix padding
2018-02-06 12:52:39 +03:00
</div>
<div className="inner">
<div className="section promoSection">
<div className="promoRow">
<div className="pluginRowBlock">
<Button href="/playground/">Try It Out</Button>
<Button href={"/docs/" + props.language + "/install.html"}>
Get Started
</Button>
<Button href={"/docs/" + props.language + "/options.html"}>
Options
</Button>
</div>
</div>
</div>
</div>
</div>
</div>
Revamp landing page (#3718) * Begin landing page revamp * Break the editor integrations onto their own lines * Add template string * Add editor line breaks * Make logo clickable * Add more docs links * Don’t split the editor list items into paragraphs * Break plugin onto its own line * Move the “Why” button to the bottom of the block * Use suggested font * Change font * Change footer color * Add assets from @orta * Fix fonts * Use new editor assets * Add npm/yarn button * Switch to npx * Minor mobile tweaks * Add dependants * Lots of zeros are cooler to look at than a “k” * Improve button sizes, respect prefers-reduced-motion * Fixup media breakpoints for Get Started section * Increase padding of editors * CSS fixes from code review * Prevent repeatedly clicking on the logo from selecting nearby text * dependant -> dependent * Various CSS tightening * Set flex-basis on editors * Add new languages panel * Improve layout of languages * Cleanup grouping code * Fix users layout * Fix language image widths * space-evenly -> space-between * Fix typo * Remove unused var * Various CSS fixes * Set overflow-x: auto on code * Improve languages layout * Add silly cursor * Make logo 'draggable' * [Site] Margins and paddings (#2) * [Site] Margins and paddings * [Site] Bring back the link to why, that's a good guide worth linking to * Improve logo mobile usage * Improve responsive layout of editors * Use static SVG for the moment (#3) * Use the static logo for the moment * Fix the broken JS, from going static, and make overscroll the right color * Fix padding
2018-02-06 12:52:39 +03:00
</div>
);
};
HomeSplash.propTypes = {
2018-07-01 16:59:20 +03:00
language: PropTypes.string
};
Revamp landing page (#3718) * Begin landing page revamp * Break the editor integrations onto their own lines * Add template string * Add editor line breaks * Make logo clickable * Add more docs links * Don’t split the editor list items into paragraphs * Break plugin onto its own line * Move the “Why” button to the bottom of the block * Use suggested font * Change font * Change footer color * Add assets from @orta * Fix fonts * Use new editor assets * Add npm/yarn button * Switch to npx * Minor mobile tweaks * Add dependants * Lots of zeros are cooler to look at than a “k” * Improve button sizes, respect prefers-reduced-motion * Fixup media breakpoints for Get Started section * Increase padding of editors * CSS fixes from code review * Prevent repeatedly clicking on the logo from selecting nearby text * dependant -> dependent * Various CSS tightening * Set flex-basis on editors * Add new languages panel * Improve layout of languages * Cleanup grouping code * Fix users layout * Fix language image widths * space-evenly -> space-between * Fix typo * Remove unused var * Various CSS fixes * Set overflow-x: auto on code * Improve languages layout * Add silly cursor * Make logo 'draggable' * [Site] Margins and paddings (#2) * [Site] Margins and paddings * [Site] Bring back the link to why, that's a good guide worth linking to * Improve logo mobile usage * Improve responsive layout of editors * Use static SVG for the moment (#3) * Use the static logo for the moment * Fix the broken JS, from going static, and make overscroll the right color * Fix padding
2018-02-06 12:52:39 +03:00
const TldrSection = ({ language }) => (
<div className="tldrSection productShowcaseSection lightBackground">
<Container>
<div
style={{
display: "flex",
flexFlow: "row wrap",
justifyContent: "space-evenly"
}}
>
<div style={{ display: "flex", flexDirection: "column" }}>
<h2>What is Prettier?</h2>
<ul style={{ flex: "1" }}>
<li>An opinionated code formatter</li>
<li>Supports many languages</li>
<li>Integrates with most editors</li>
Revamp landing page (#3718) * Begin landing page revamp * Break the editor integrations onto their own lines * Add template string * Add editor line breaks * Make logo clickable * Add more docs links * Don’t split the editor list items into paragraphs * Break plugin onto its own line * Move the “Why” button to the bottom of the block * Use suggested font * Change font * Change footer color * Add assets from @orta * Fix fonts * Use new editor assets * Add npm/yarn button * Switch to npx * Minor mobile tweaks * Add dependants * Lots of zeros are cooler to look at than a “k” * Improve button sizes, respect prefers-reduced-motion * Fixup media breakpoints for Get Started section * Increase padding of editors * CSS fixes from code review * Prevent repeatedly clicking on the logo from selecting nearby text * dependant -> dependent * Various CSS tightening * Set flex-basis on editors * Add new languages panel * Improve layout of languages * Cleanup grouping code * Fix users layout * Fix language image widths * space-evenly -> space-between * Fix typo * Remove unused var * Various CSS fixes * Set overflow-x: auto on code * Improve languages layout * Add silly cursor * Make logo 'draggable' * [Site] Margins and paddings (#2) * [Site] Margins and paddings * [Site] Bring back the link to why, that's a good guide worth linking to * Improve logo mobile usage * Improve responsive layout of editors * Use static SVG for the moment (#3) * Use the static logo for the moment * Fix the broken JS, from going static, and make overscroll the right color * Fix padding
2018-02-06 12:52:39 +03:00
<li>Has few options</li>
</ul>
</div>
<div style={{ display: "flex", flexDirection: "column" }}>
<h2>Why?</h2>
<ul style={{ flex: "1" }}>
<li>You press save and code is formatted</li>
<li>No need to discuss style in code review</li>
<li>Saves you time and energy</li>
<li>
<a href={"/docs/" + language + "/why-prettier.html"}>And more</a>
</li>
</ul>
</div>
</div>
</Container>
</div>
);
TldrSection.propTypes = {
2018-07-01 16:59:20 +03:00
language: PropTypes.string
Revamp landing page (#3718) * Begin landing page revamp * Break the editor integrations onto their own lines * Add template string * Add editor line breaks * Make logo clickable * Add more docs links * Don’t split the editor list items into paragraphs * Break plugin onto its own line * Move the “Why” button to the bottom of the block * Use suggested font * Change font * Change footer color * Add assets from @orta * Fix fonts * Use new editor assets * Add npm/yarn button * Switch to npx * Minor mobile tweaks * Add dependants * Lots of zeros are cooler to look at than a “k” * Improve button sizes, respect prefers-reduced-motion * Fixup media breakpoints for Get Started section * Increase padding of editors * CSS fixes from code review * Prevent repeatedly clicking on the logo from selecting nearby text * dependant -> dependent * Various CSS tightening * Set flex-basis on editors * Add new languages panel * Improve layout of languages * Cleanup grouping code * Fix users layout * Fix language image widths * space-evenly -> space-between * Fix typo * Remove unused var * Various CSS fixes * Set overflow-x: auto on code * Improve languages layout * Add silly cursor * Make logo 'draggable' * [Site] Margins and paddings (#2) * [Site] Margins and paddings * [Site] Bring back the link to why, that's a good guide worth linking to * Improve logo mobile usage * Improve responsive layout of editors * Use static SVG for the moment (#3) * Use the static logo for the moment * Fix the broken JS, from going static, and make overscroll the right color * Fix padding
2018-02-06 12:52:39 +03:00
};
const Language = ({ name, nameLink, showName, image, variants }) => (
Revamp landing page (#3718) * Begin landing page revamp * Break the editor integrations onto their own lines * Add template string * Add editor line breaks * Make logo clickable * Add more docs links * Don’t split the editor list items into paragraphs * Break plugin onto its own line * Move the “Why” button to the bottom of the block * Use suggested font * Change font * Change footer color * Add assets from @orta * Fix fonts * Use new editor assets * Add npm/yarn button * Switch to npx * Minor mobile tweaks * Add dependants * Lots of zeros are cooler to look at than a “k” * Improve button sizes, respect prefers-reduced-motion * Fixup media breakpoints for Get Started section * Increase padding of editors * CSS fixes from code review * Prevent repeatedly clicking on the logo from selecting nearby text * dependant -> dependent * Various CSS tightening * Set flex-basis on editors * Add new languages panel * Improve layout of languages * Cleanup grouping code * Fix users layout * Fix language image widths * space-evenly -> space-between * Fix typo * Remove unused var * Various CSS fixes * Set overflow-x: auto on code * Improve languages layout * Add silly cursor * Make logo 'draggable' * [Site] Margins and paddings (#2) * [Site] Margins and paddings * [Site] Bring back the link to why, that's a good guide worth linking to * Improve logo mobile usage * Improve responsive layout of editors * Use static SVG for the moment (#3) * Use the static logo for the moment * Fix the broken JS, from going static, and make overscroll the right color * Fix padding
2018-02-06 12:52:39 +03:00
<div
className="languageCategory"
style={{
display: "flex",
alignItems: "flex-start",
paddingBottom: "1em"
}}
>
<img src={image} style={{ width: "50px", padding: "0 20px" }} />
<ul>
{showName && (
<li className="accented">
{nameLink ? <a href={nameLink}>{name}</a> : name}
</li>
)}
Revamp landing page (#3718) * Begin landing page revamp * Break the editor integrations onto their own lines * Add template string * Add editor line breaks * Make logo clickable * Add more docs links * Don’t split the editor list items into paragraphs * Break plugin onto its own line * Move the “Why” button to the bottom of the block * Use suggested font * Change font * Change footer color * Add assets from @orta * Fix fonts * Use new editor assets * Add npm/yarn button * Switch to npx * Minor mobile tweaks * Add dependants * Lots of zeros are cooler to look at than a “k” * Improve button sizes, respect prefers-reduced-motion * Fixup media breakpoints for Get Started section * Increase padding of editors * CSS fixes from code review * Prevent repeatedly clicking on the logo from selecting nearby text * dependant -> dependent * Various CSS tightening * Set flex-basis on editors * Add new languages panel * Improve layout of languages * Cleanup grouping code * Fix users layout * Fix language image widths * space-evenly -> space-between * Fix typo * Remove unused var * Various CSS fixes * Set overflow-x: auto on code * Improve languages layout * Add silly cursor * Make logo 'draggable' * [Site] Margins and paddings (#2) * [Site] Margins and paddings * [Site] Bring back the link to why, that's a good guide worth linking to * Improve logo mobile usage * Improve responsive layout of editors * Use static SVG for the moment (#3) * Use the static logo for the moment * Fix the broken JS, from going static, and make overscroll the right color * Fix padding
2018-02-06 12:52:39 +03:00
{variants.map(variant => (
<li key={variant}>
Revamp landing page (#3718) * Begin landing page revamp * Break the editor integrations onto their own lines * Add template string * Add editor line breaks * Make logo clickable * Add more docs links * Don’t split the editor list items into paragraphs * Break plugin onto its own line * Move the “Why” button to the bottom of the block * Use suggested font * Change font * Change footer color * Add assets from @orta * Fix fonts * Use new editor assets * Add npm/yarn button * Switch to npx * Minor mobile tweaks * Add dependants * Lots of zeros are cooler to look at than a “k” * Improve button sizes, respect prefers-reduced-motion * Fixup media breakpoints for Get Started section * Increase padding of editors * CSS fixes from code review * Prevent repeatedly clicking on the logo from selecting nearby text * dependant -> dependent * Various CSS tightening * Set flex-basis on editors * Add new languages panel * Improve layout of languages * Cleanup grouping code * Fix users layout * Fix language image widths * space-evenly -> space-between * Fix typo * Remove unused var * Various CSS fixes * Set overflow-x: auto on code * Improve languages layout * Add silly cursor * Make logo 'draggable' * [Site] Margins and paddings (#2) * [Site] Margins and paddings * [Site] Bring back the link to why, that's a good guide worth linking to * Improve logo mobile usage * Improve responsive layout of editors * Use static SVG for the moment (#3) * Use the static logo for the moment * Fix the broken JS, from going static, and make overscroll the right color * Fix padding
2018-02-06 12:52:39 +03:00
<MarkdownBlock>{variant}</MarkdownBlock>
</li>
Revamp landing page (#3718) * Begin landing page revamp * Break the editor integrations onto their own lines * Add template string * Add editor line breaks * Make logo clickable * Add more docs links * Don’t split the editor list items into paragraphs * Break plugin onto its own line * Move the “Why” button to the bottom of the block * Use suggested font * Change font * Change footer color * Add assets from @orta * Fix fonts * Use new editor assets * Add npm/yarn button * Switch to npx * Minor mobile tweaks * Add dependants * Lots of zeros are cooler to look at than a “k” * Improve button sizes, respect prefers-reduced-motion * Fixup media breakpoints for Get Started section * Increase padding of editors * CSS fixes from code review * Prevent repeatedly clicking on the logo from selecting nearby text * dependant -> dependent * Various CSS tightening * Set flex-basis on editors * Add new languages panel * Improve layout of languages * Cleanup grouping code * Fix users layout * Fix language image widths * space-evenly -> space-between * Fix typo * Remove unused var * Various CSS fixes * Set overflow-x: auto on code * Improve languages layout * Add silly cursor * Make logo 'draggable' * [Site] Margins and paddings (#2) * [Site] Margins and paddings * [Site] Bring back the link to why, that's a good guide worth linking to * Improve logo mobile usage * Improve responsive layout of editors * Use static SVG for the moment (#3) * Use the static logo for the moment * Fix the broken JS, from going static, and make overscroll the right color * Fix padding
2018-02-06 12:52:39 +03:00
))}
</ul>
Revamp landing page (#3718) * Begin landing page revamp * Break the editor integrations onto their own lines * Add template string * Add editor line breaks * Make logo clickable * Add more docs links * Don’t split the editor list items into paragraphs * Break plugin onto its own line * Move the “Why” button to the bottom of the block * Use suggested font * Change font * Change footer color * Add assets from @orta * Fix fonts * Use new editor assets * Add npm/yarn button * Switch to npx * Minor mobile tweaks * Add dependants * Lots of zeros are cooler to look at than a “k” * Improve button sizes, respect prefers-reduced-motion * Fixup media breakpoints for Get Started section * Increase padding of editors * CSS fixes from code review * Prevent repeatedly clicking on the logo from selecting nearby text * dependant -> dependent * Various CSS tightening * Set flex-basis on editors * Add new languages panel * Improve layout of languages * Cleanup grouping code * Fix users layout * Fix language image widths * space-evenly -> space-between * Fix typo * Remove unused var * Various CSS fixes * Set overflow-x: auto on code * Improve languages layout * Add silly cursor * Make logo 'draggable' * [Site] Margins and paddings (#2) * [Site] Margins and paddings * [Site] Bring back the link to why, that's a good guide worth linking to * Improve logo mobile usage * Improve responsive layout of editors * Use static SVG for the moment (#3) * Use the static logo for the moment * Fix the broken JS, from going static, and make overscroll the right color * Fix padding
2018-02-06 12:52:39 +03:00
</div>
);
Language.propTypes = {
2018-07-01 16:59:20 +03:00
name: PropTypes.string,
nameLink: PropTypes.string,
showName: PropTypes.bool,
2018-07-01 16:59:20 +03:00
image: PropTypes.string,
variants: PropTypes.array
Revamp landing page (#3718) * Begin landing page revamp * Break the editor integrations onto their own lines * Add template string * Add editor line breaks * Make logo clickable * Add more docs links * Don’t split the editor list items into paragraphs * Break plugin onto its own line * Move the “Why” button to the bottom of the block * Use suggested font * Change font * Change footer color * Add assets from @orta * Fix fonts * Use new editor assets * Add npm/yarn button * Switch to npx * Minor mobile tweaks * Add dependants * Lots of zeros are cooler to look at than a “k” * Improve button sizes, respect prefers-reduced-motion * Fixup media breakpoints for Get Started section * Increase padding of editors * CSS fixes from code review * Prevent repeatedly clicking on the logo from selecting nearby text * dependant -> dependent * Various CSS tightening * Set flex-basis on editors * Add new languages panel * Improve layout of languages * Cleanup grouping code * Fix users layout * Fix language image widths * space-evenly -> space-between * Fix typo * Remove unused var * Various CSS fixes * Set overflow-x: auto on code * Improve languages layout * Add silly cursor * Make logo 'draggable' * [Site] Margins and paddings (#2) * [Site] Margins and paddings * [Site] Bring back the link to why, that's a good guide worth linking to * Improve logo mobile usage * Improve responsive layout of editors * Use static SVG for the moment (#3) * Use the static logo for the moment * Fix the broken JS, from going static, and make overscroll the right color * Fix padding
2018-02-06 12:52:39 +03:00
};
const LanguagesSection = () => {
2019-01-22 16:54:32 +03:00
const languageChunks = siteConfig.supportedLanguages.reduce(
(acc, language) => {
const last = acc[acc.length - 1];
if (
last &&
last.length < 2 &&
last.reduce((sum, lang) => sum + lang.variants.length, 0) +
language.variants.length <
9
2019-01-22 16:54:32 +03:00
) {
last.push(language);
} else {
acc.push([language]);
}
return acc;
},
[]
);
Revamp landing page (#3718) * Begin landing page revamp * Break the editor integrations onto their own lines * Add template string * Add editor line breaks * Make logo clickable * Add more docs links * Don’t split the editor list items into paragraphs * Break plugin onto its own line * Move the “Why” button to the bottom of the block * Use suggested font * Change font * Change footer color * Add assets from @orta * Fix fonts * Use new editor assets * Add npm/yarn button * Switch to npx * Minor mobile tweaks * Add dependants * Lots of zeros are cooler to look at than a “k” * Improve button sizes, respect prefers-reduced-motion * Fixup media breakpoints for Get Started section * Increase padding of editors * CSS fixes from code review * Prevent repeatedly clicking on the logo from selecting nearby text * dependant -> dependent * Various CSS tightening * Set flex-basis on editors * Add new languages panel * Improve layout of languages * Cleanup grouping code * Fix users layout * Fix language image widths * space-evenly -> space-between * Fix typo * Remove unused var * Various CSS fixes * Set overflow-x: auto on code * Improve languages layout * Add silly cursor * Make logo 'draggable' * [Site] Margins and paddings (#2) * [Site] Margins and paddings * [Site] Bring back the link to why, that's a good guide worth linking to * Improve logo mobile usage * Improve responsive layout of editors * Use static SVG for the moment (#3) * Use the static logo for the moment * Fix the broken JS, from going static, and make overscroll the right color * Fix padding
2018-02-06 12:52:39 +03:00
return (
<div
className="languagesSection productShowcaseSection"
style={{ textAlign: "center" }}
>
<Container>
<h2>Works with the Tools You Use</h2>
<div
style={{
display: "flex",
flexFlow: "row wrap",
justifyContent: "space-around"
}}
>
{languageChunks.map((languageChunk, index) => (
<div key={index} style={{ flex: "1 1 auto" }}>
{languageChunk.map(language => (
<Language key={language.name} {...language} />
))}
</div>
))}
</div>
</Container>
</div>
);
};
const Editor = ({ content = "", image, name }) => (
<div className="editor">
<img className="editorImage" src={image} />
<div className="editorInfo">
2018-07-01 16:59:20 +03:00
<h3 className="editorName">{name}</h3>
Revamp landing page (#3718) * Begin landing page revamp * Break the editor integrations onto their own lines * Add template string * Add editor line breaks * Make logo clickable * Add more docs links * Don’t split the editor list items into paragraphs * Break plugin onto its own line * Move the “Why” button to the bottom of the block * Use suggested font * Change font * Change footer color * Add assets from @orta * Fix fonts * Use new editor assets * Add npm/yarn button * Switch to npx * Minor mobile tweaks * Add dependants * Lots of zeros are cooler to look at than a “k” * Improve button sizes, respect prefers-reduced-motion * Fixup media breakpoints for Get Started section * Increase padding of editors * CSS fixes from code review * Prevent repeatedly clicking on the logo from selecting nearby text * dependant -> dependent * Various CSS tightening * Set flex-basis on editors * Add new languages panel * Improve layout of languages * Cleanup grouping code * Fix users layout * Fix language image widths * space-evenly -> space-between * Fix typo * Remove unused var * Various CSS fixes * Set overflow-x: auto on code * Improve languages layout * Add silly cursor * Make logo 'draggable' * [Site] Margins and paddings (#2) * [Site] Margins and paddings * [Site] Bring back the link to why, that's a good guide worth linking to * Improve logo mobile usage * Improve responsive layout of editors * Use static SVG for the moment (#3) * Use the static logo for the moment * Fix the broken JS, from going static, and make overscroll the right color * Fix padding
2018-02-06 12:52:39 +03:00
<MarkdownBlock>{content.replace(/\n/g, " \n")}</MarkdownBlock>
</div>
</div>
);
Editor.propTypes = {
2018-07-01 16:59:20 +03:00
content: PropTypes.string,
image: PropTypes.string.isRequired,
name: PropTypes.string.isRequired
Revamp landing page (#3718) * Begin landing page revamp * Break the editor integrations onto their own lines * Add template string * Add editor line breaks * Make logo clickable * Add more docs links * Don’t split the editor list items into paragraphs * Break plugin onto its own line * Move the “Why” button to the bottom of the block * Use suggested font * Change font * Change footer color * Add assets from @orta * Fix fonts * Use new editor assets * Add npm/yarn button * Switch to npx * Minor mobile tweaks * Add dependants * Lots of zeros are cooler to look at than a “k” * Improve button sizes, respect prefers-reduced-motion * Fixup media breakpoints for Get Started section * Increase padding of editors * CSS fixes from code review * Prevent repeatedly clicking on the logo from selecting nearby text * dependant -> dependent * Various CSS tightening * Set flex-basis on editors * Add new languages panel * Improve layout of languages * Cleanup grouping code * Fix users layout * Fix language image widths * space-evenly -> space-between * Fix typo * Remove unused var * Various CSS fixes * Set overflow-x: auto on code * Improve languages layout * Add silly cursor * Make logo 'draggable' * [Site] Margins and paddings (#2) * [Site] Margins and paddings * [Site] Bring back the link to why, that's a good guide worth linking to * Improve logo mobile usage * Improve responsive layout of editors * Use static SVG for the moment (#3) * Use the static logo for the moment * Fix the broken JS, from going static, and make overscroll the right color * Fix padding
2018-02-06 12:52:39 +03:00
};
const EditorSupportSection = () => (
<div className="editorSupportSection productShowcaseSection lightBackground">
<Container>
<h2>Editor Support</h2>
<div
style={{
display: "flex",
flexFlow: "row wrap",
justifyContent: "space-around"
}}
>
{siteConfig.editors.map(editor => (
<Editor key={editor.name} {...editor} />
))}
</div>
</Container>
<div style={{ float: "right" }}>
<span>Got more? </span>
<a
href={`${siteConfig.githubUrl}/edit/master/website/data/editors.yml`}
className="button"
>
Send a PR
</a>
</div>
</div>
);
const bash = (...args) => `~~~bash\n${String.raw(...args)}\n~~~`;
const json = object => `~~~json\n${JSON.stringify(object, null, 2)}\n~~~`;
class GetStartedSection extends React.Component {
constructor(props) {
super(props);
this.state = {
npmClient: "yarn"
};
}
render() {
return (
Revamp landing page (#3718) * Begin landing page revamp * Break the editor integrations onto their own lines * Add template string * Add editor line breaks * Make logo clickable * Add more docs links * Don’t split the editor list items into paragraphs * Break plugin onto its own line * Move the “Why” button to the bottom of the block * Use suggested font * Change font * Change footer color * Add assets from @orta * Fix fonts * Use new editor assets * Add npm/yarn button * Switch to npx * Minor mobile tweaks * Add dependants * Lots of zeros are cooler to look at than a “k” * Improve button sizes, respect prefers-reduced-motion * Fixup media breakpoints for Get Started section * Increase padding of editors * CSS fixes from code review * Prevent repeatedly clicking on the logo from selecting nearby text * dependant -> dependent * Various CSS tightening * Set flex-basis on editors * Add new languages panel * Improve layout of languages * Cleanup grouping code * Fix users layout * Fix language image widths * space-evenly -> space-between * Fix typo * Remove unused var * Various CSS fixes * Set overflow-x: auto on code * Improve languages layout * Add silly cursor * Make logo 'draggable' * [Site] Margins and paddings (#2) * [Site] Margins and paddings * [Site] Bring back the link to why, that's a good guide worth linking to * Improve logo mobile usage * Improve responsive layout of editors * Use static SVG for the moment (#3) * Use the static logo for the moment * Fix the broken JS, from going static, and make overscroll the right color * Fix padding
2018-02-06 12:52:39 +03:00
<div className="getStartedSection productShowcaseSection">
<Container>
<div
Revamp landing page (#3718) * Begin landing page revamp * Break the editor integrations onto their own lines * Add template string * Add editor line breaks * Make logo clickable * Add more docs links * Don’t split the editor list items into paragraphs * Break plugin onto its own line * Move the “Why” button to the bottom of the block * Use suggested font * Change font * Change footer color * Add assets from @orta * Fix fonts * Use new editor assets * Add npm/yarn button * Switch to npx * Minor mobile tweaks * Add dependants * Lots of zeros are cooler to look at than a “k” * Improve button sizes, respect prefers-reduced-motion * Fixup media breakpoints for Get Started section * Increase padding of editors * CSS fixes from code review * Prevent repeatedly clicking on the logo from selecting nearby text * dependant -> dependent * Various CSS tightening * Set flex-basis on editors * Add new languages panel * Improve layout of languages * Cleanup grouping code * Fix users layout * Fix language image widths * space-evenly -> space-between * Fix typo * Remove unused var * Various CSS fixes * Set overflow-x: auto on code * Improve languages layout * Add silly cursor * Make logo 'draggable' * [Site] Margins and paddings (#2) * [Site] Margins and paddings * [Site] Bring back the link to why, that's a good guide worth linking to * Improve logo mobile usage * Improve responsive layout of editors * Use static SVG for the moment (#3) * Use the static logo for the moment * Fix the broken JS, from going static, and make overscroll the right color * Fix padding
2018-02-06 12:52:39 +03:00
className="getStartedFlexContainer"
style={{
display: "flex",
flexFlow: "row",
alignItems: "baseline",
justifyContent: "space-between"
}}
>
Revamp landing page (#3718) * Begin landing page revamp * Break the editor integrations onto their own lines * Add template string * Add editor line breaks * Make logo clickable * Add more docs links * Don’t split the editor list items into paragraphs * Break plugin onto its own line * Move the “Why” button to the bottom of the block * Use suggested font * Change font * Change footer color * Add assets from @orta * Fix fonts * Use new editor assets * Add npm/yarn button * Switch to npx * Minor mobile tweaks * Add dependants * Lots of zeros are cooler to look at than a “k” * Improve button sizes, respect prefers-reduced-motion * Fixup media breakpoints for Get Started section * Increase padding of editors * CSS fixes from code review * Prevent repeatedly clicking on the logo from selecting nearby text * dependant -> dependent * Various CSS tightening * Set flex-basis on editors * Add new languages panel * Improve layout of languages * Cleanup grouping code * Fix users layout * Fix language image widths * space-evenly -> space-between * Fix typo * Remove unused var * Various CSS fixes * Set overflow-x: auto on code * Improve languages layout * Add silly cursor * Make logo 'draggable' * [Site] Margins and paddings (#2) * [Site] Margins and paddings * [Site] Bring back the link to why, that's a good guide worth linking to * Improve logo mobile usage * Improve responsive layout of editors * Use static SVG for the moment (#3) * Use the static logo for the moment * Fix the broken JS, from going static, and make overscroll the right color * Fix padding
2018-02-06 12:52:39 +03:00
<div className="getStartedSteps">
<h2>Get Started</h2>
<ol>
<li>
Add prettier to your project:
<div className="yarnOnly">
<MarkdownBlock>
{bash`yarn add prettier --dev --exact`}
</MarkdownBlock>
</div>
<div className="npmOnly">
<MarkdownBlock>
{bash`npm install prettier --save-dev --save-exact`}
</MarkdownBlock>
</div>
</li>
<li>
Verify by running against a file:
<div className="yarnOnly">
<MarkdownBlock>
{bash`yarn prettier --write src/index.js`}
</MarkdownBlock>
</div>
<div className="npmOnly">
<MarkdownBlock>
{bash`npx prettier --write src/index.js`}
</MarkdownBlock>
</div>
</li>
<li>
Run prettier when commiting files:
<div className="yarnOnly">
<MarkdownBlock>
{bash`yarn add pretty-quick husky --dev`}
</MarkdownBlock>
</div>
<div className="npmOnly">
<MarkdownBlock>
{bash`npm install pretty-quick husky --save-dev`}
</MarkdownBlock>
</div>
Then add this config to <code>package.json</code>:
Revamp landing page (#3718) * Begin landing page revamp * Break the editor integrations onto their own lines * Add template string * Add editor line breaks * Make logo clickable * Add more docs links * Don’t split the editor list items into paragraphs * Break plugin onto its own line * Move the “Why” button to the bottom of the block * Use suggested font * Change font * Change footer color * Add assets from @orta * Fix fonts * Use new editor assets * Add npm/yarn button * Switch to npx * Minor mobile tweaks * Add dependants * Lots of zeros are cooler to look at than a “k” * Improve button sizes, respect prefers-reduced-motion * Fixup media breakpoints for Get Started section * Increase padding of editors * CSS fixes from code review * Prevent repeatedly clicking on the logo from selecting nearby text * dependant -> dependent * Various CSS tightening * Set flex-basis on editors * Add new languages panel * Improve layout of languages * Cleanup grouping code * Fix users layout * Fix language image widths * space-evenly -> space-between * Fix typo * Remove unused var * Various CSS fixes * Set overflow-x: auto on code * Improve languages layout * Add silly cursor * Make logo 'draggable' * [Site] Margins and paddings (#2) * [Site] Margins and paddings * [Site] Bring back the link to why, that's a good guide worth linking to * Improve logo mobile usage * Improve responsive layout of editors * Use static SVG for the moment (#3) * Use the static logo for the moment * Fix the broken JS, from going static, and make overscroll the right color * Fix padding
2018-02-06 12:52:39 +03:00
<MarkdownBlock>
{json({
husky: {
hooks: {
"pre-commit": "pretty-quick --staged"
}
Revamp landing page (#3718) * Begin landing page revamp * Break the editor integrations onto their own lines * Add template string * Add editor line breaks * Make logo clickable * Add more docs links * Don’t split the editor list items into paragraphs * Break plugin onto its own line * Move the “Why” button to the bottom of the block * Use suggested font * Change font * Change footer color * Add assets from @orta * Fix fonts * Use new editor assets * Add npm/yarn button * Switch to npx * Minor mobile tweaks * Add dependants * Lots of zeros are cooler to look at than a “k” * Improve button sizes, respect prefers-reduced-motion * Fixup media breakpoints for Get Started section * Increase padding of editors * CSS fixes from code review * Prevent repeatedly clicking on the logo from selecting nearby text * dependant -> dependent * Various CSS tightening * Set flex-basis on editors * Add new languages panel * Improve layout of languages * Cleanup grouping code * Fix users layout * Fix language image widths * space-evenly -> space-between * Fix typo * Remove unused var * Various CSS fixes * Set overflow-x: auto on code * Improve languages layout * Add silly cursor * Make logo 'draggable' * [Site] Margins and paddings (#2) * [Site] Margins and paddings * [Site] Bring back the link to why, that's a good guide worth linking to * Improve logo mobile usage * Improve responsive layout of editors * Use static SVG for the moment (#3) * Use the static logo for the moment * Fix the broken JS, from going static, and make overscroll the right color * Fix padding
2018-02-06 12:52:39 +03:00
}
})}
</MarkdownBlock>
</li>
</ol>
</div>
<div
style={{
display: "flex",
flexDirection: "column",
alignItems: "flex-end",
flexGrow: 1,
marginLeft: "-75px"
}}
>
<ButtonGroup>
<a className="button active showYarnButton" href="#">
yarn
</a>
<a className="button showNpmButton" href="#">
npm
</a>
</ButtonGroup>
<img
className="decorativeRects"
style={{
marginTop: "32px"
}}
src="/images/get_started_rects.svg"
/>
Revamp landing page (#3718) * Begin landing page revamp * Break the editor integrations onto their own lines * Add template string * Add editor line breaks * Make logo clickable * Add more docs links * Don’t split the editor list items into paragraphs * Break plugin onto its own line * Move the “Why” button to the bottom of the block * Use suggested font * Change font * Change footer color * Add assets from @orta * Fix fonts * Use new editor assets * Add npm/yarn button * Switch to npx * Minor mobile tweaks * Add dependants * Lots of zeros are cooler to look at than a “k” * Improve button sizes, respect prefers-reduced-motion * Fixup media breakpoints for Get Started section * Increase padding of editors * CSS fixes from code review * Prevent repeatedly clicking on the logo from selecting nearby text * dependant -> dependent * Various CSS tightening * Set flex-basis on editors * Add new languages panel * Improve layout of languages * Cleanup grouping code * Fix users layout * Fix language image widths * space-evenly -> space-between * Fix typo * Remove unused var * Various CSS fixes * Set overflow-x: auto on code * Improve languages layout * Add silly cursor * Make logo 'draggable' * [Site] Margins and paddings (#2) * [Site] Margins and paddings * [Site] Bring back the link to why, that's a good guide worth linking to * Improve logo mobile usage * Improve responsive layout of editors * Use static SVG for the moment (#3) * Use the static logo for the moment * Fix the broken JS, from going static, and make overscroll the right color * Fix padding
2018-02-06 12:52:39 +03:00
</div>
</div>
Revamp landing page (#3718) * Begin landing page revamp * Break the editor integrations onto their own lines * Add template string * Add editor line breaks * Make logo clickable * Add more docs links * Don’t split the editor list items into paragraphs * Break plugin onto its own line * Move the “Why” button to the bottom of the block * Use suggested font * Change font * Change footer color * Add assets from @orta * Fix fonts * Use new editor assets * Add npm/yarn button * Switch to npx * Minor mobile tweaks * Add dependants * Lots of zeros are cooler to look at than a “k” * Improve button sizes, respect prefers-reduced-motion * Fixup media breakpoints for Get Started section * Increase padding of editors * CSS fixes from code review * Prevent repeatedly clicking on the logo from selecting nearby text * dependant -> dependent * Various CSS tightening * Set flex-basis on editors * Add new languages panel * Improve layout of languages * Cleanup grouping code * Fix users layout * Fix language image widths * space-evenly -> space-between * Fix typo * Remove unused var * Various CSS fixes * Set overflow-x: auto on code * Improve languages layout * Add silly cursor * Make logo 'draggable' * [Site] Margins and paddings (#2) * [Site] Margins and paddings * [Site] Bring back the link to why, that's a good guide worth linking to * Improve logo mobile usage * Improve responsive layout of editors * Use static SVG for the moment (#3) * Use the static logo for the moment * Fix the broken JS, from going static, and make overscroll the right color * Fix padding
2018-02-06 12:52:39 +03:00
</Container>
</div>
);
}
}
Revamp landing page (#3718) * Begin landing page revamp * Break the editor integrations onto their own lines * Add template string * Add editor line breaks * Make logo clickable * Add more docs links * Don’t split the editor list items into paragraphs * Break plugin onto its own line * Move the “Why” button to the bottom of the block * Use suggested font * Change font * Change footer color * Add assets from @orta * Fix fonts * Use new editor assets * Add npm/yarn button * Switch to npx * Minor mobile tweaks * Add dependants * Lots of zeros are cooler to look at than a “k” * Improve button sizes, respect prefers-reduced-motion * Fixup media breakpoints for Get Started section * Increase padding of editors * CSS fixes from code review * Prevent repeatedly clicking on the logo from selecting nearby text * dependant -> dependent * Various CSS tightening * Set flex-basis on editors * Add new languages panel * Improve layout of languages * Cleanup grouping code * Fix users layout * Fix language image widths * space-evenly -> space-between * Fix typo * Remove unused var * Various CSS fixes * Set overflow-x: auto on code * Improve languages layout * Add silly cursor * Make logo 'draggable' * [Site] Margins and paddings (#2) * [Site] Margins and paddings * [Site] Bring back the link to why, that's a good guide worth linking to * Improve logo mobile usage * Improve responsive layout of editors * Use static SVG for the moment (#3) * Use the static logo for the moment * Fix the broken JS, from going static, and make overscroll the right color * Fix padding
2018-02-06 12:52:39 +03:00
const UsersSection = ({ language }) => {
const showcase = siteConfig.users
.filter(user => {
return user.pinned;
})
.map((user, i) => {
return (
<a key={i} className="growOnHover" href={user.infoLink}>
<img className="user" src={user.greyImage} title={user.caption} />
</a>
);
});
return (
<div className="usersSection productShowcaseSection lightBackground">
<Container>
<h2>Used By People You Rely On</h2>
<div style={{ textAlign: "right" }} />
<div
style={{
display: "flex",
flexFlow: "row wrap",
justifyContent: "space-around"
}}
>
{showcase}
</div>
<div className="more-users">
<a
className="button"
href={siteConfig.baseUrl + language + "/users/"}
target="_self"
>
See All Others
</a>
<a
className="button"
href={`${siteConfig.githubUrl}/edit/master/website/data/users.yml`}
>
Add Your Project
</a>
</div>
Revamp landing page (#3718) * Begin landing page revamp * Break the editor integrations onto their own lines * Add template string * Add editor line breaks * Make logo clickable * Add more docs links * Don’t split the editor list items into paragraphs * Break plugin onto its own line * Move the “Why” button to the bottom of the block * Use suggested font * Change font * Change footer color * Add assets from @orta * Fix fonts * Use new editor assets * Add npm/yarn button * Switch to npx * Minor mobile tweaks * Add dependants * Lots of zeros are cooler to look at than a “k” * Improve button sizes, respect prefers-reduced-motion * Fixup media breakpoints for Get Started section * Increase padding of editors * CSS fixes from code review * Prevent repeatedly clicking on the logo from selecting nearby text * dependant -> dependent * Various CSS tightening * Set flex-basis on editors * Add new languages panel * Improve layout of languages * Cleanup grouping code * Fix users layout * Fix language image widths * space-evenly -> space-between * Fix typo * Remove unused var * Various CSS fixes * Set overflow-x: auto on code * Improve languages layout * Add silly cursor * Make logo 'draggable' * [Site] Margins and paddings (#2) * [Site] Margins and paddings * [Site] Bring back the link to why, that's a good guide worth linking to * Improve logo mobile usage * Improve responsive layout of editors * Use static SVG for the moment (#3) * Use the static logo for the moment * Fix the broken JS, from going static, and make overscroll the right color * Fix padding
2018-02-06 12:52:39 +03:00
<h2 className="ecosystemSubHeader">Established in the Ecosystem</h2>
<div
className="ecosystemSubSection"
style={{
display: "flex",
justifyContent: "space-around",
flexFlow: "row wrap"
}}
>
<div style={{ display: "flex", marginTop: "22px" }}>
<a
Revamp landing page (#3718) * Begin landing page revamp * Break the editor integrations onto their own lines * Add template string * Add editor line breaks * Make logo clickable * Add more docs links * Don’t split the editor list items into paragraphs * Break plugin onto its own line * Move the “Why” button to the bottom of the block * Use suggested font * Change font * Change footer color * Add assets from @orta * Fix fonts * Use new editor assets * Add npm/yarn button * Switch to npx * Minor mobile tweaks * Add dependants * Lots of zeros are cooler to look at than a “k” * Improve button sizes, respect prefers-reduced-motion * Fixup media breakpoints for Get Started section * Increase padding of editors * CSS fixes from code review * Prevent repeatedly clicking on the logo from selecting nearby text * dependant -> dependent * Various CSS tightening * Set flex-basis on editors * Add new languages panel * Improve layout of languages * Cleanup grouping code * Fix users layout * Fix language image widths * space-evenly -> space-between * Fix typo * Remove unused var * Various CSS fixes * Set overflow-x: auto on code * Improve languages layout * Add silly cursor * Make logo 'draggable' * [Site] Margins and paddings (#2) * [Site] Margins and paddings * [Site] Bring back the link to why, that's a good guide worth linking to * Improve logo mobile usage * Improve responsive layout of editors * Use static SVG for the moment (#3) * Use the static logo for the moment * Fix the broken JS, from going static, and make overscroll the right color * Fix padding
2018-02-06 12:52:39 +03:00
href="https://npmjs.com/package/prettier"
className="growOnHover"
>
Revamp landing page (#3718) * Begin landing page revamp * Break the editor integrations onto their own lines * Add template string * Add editor line breaks * Make logo clickable * Add more docs links * Don’t split the editor list items into paragraphs * Break plugin onto its own line * Move the “Why” button to the bottom of the block * Use suggested font * Change font * Change footer color * Add assets from @orta * Fix fonts * Use new editor assets * Add npm/yarn button * Switch to npx * Minor mobile tweaks * Add dependants * Lots of zeros are cooler to look at than a “k” * Improve button sizes, respect prefers-reduced-motion * Fixup media breakpoints for Get Started section * Increase padding of editors * CSS fixes from code review * Prevent repeatedly clicking on the logo from selecting nearby text * dependant -> dependent * Various CSS tightening * Set flex-basis on editors * Add new languages panel * Improve layout of languages * Cleanup grouping code * Fix users layout * Fix language image widths * space-evenly -> space-between * Fix typo * Remove unused var * Various CSS fixes * Set overflow-x: auto on code * Improve languages layout * Add silly cursor * Make logo 'draggable' * [Site] Margins and paddings (#2) * [Site] Margins and paddings * [Site] Bring back the link to why, that's a good guide worth linking to * Improve logo mobile usage * Improve responsive layout of editors * Use static SVG for the moment (#3) * Use the static logo for the moment * Fix the broken JS, from going static, and make overscroll the right color * Fix padding
2018-02-06 12:52:39 +03:00
<img src="/images/npm_grey.svg" style={{ height: "100px" }} />
</a>
Revamp landing page (#3718) * Begin landing page revamp * Break the editor integrations onto their own lines * Add template string * Add editor line breaks * Make logo clickable * Add more docs links * Don’t split the editor list items into paragraphs * Break plugin onto its own line * Move the “Why” button to the bottom of the block * Use suggested font * Change font * Change footer color * Add assets from @orta * Fix fonts * Use new editor assets * Add npm/yarn button * Switch to npx * Minor mobile tweaks * Add dependants * Lots of zeros are cooler to look at than a “k” * Improve button sizes, respect prefers-reduced-motion * Fixup media breakpoints for Get Started section * Increase padding of editors * CSS fixes from code review * Prevent repeatedly clicking on the logo from selecting nearby text * dependant -> dependent * Various CSS tightening * Set flex-basis on editors * Add new languages panel * Improve layout of languages * Cleanup grouping code * Fix users layout * Fix language image widths * space-evenly -> space-between * Fix typo * Remove unused var * Various CSS fixes * Set overflow-x: auto on code * Improve languages layout * Add silly cursor * Make logo 'draggable' * [Site] Margins and paddings (#2) * [Site] Margins and paddings * [Site] Bring back the link to why, that's a good guide worth linking to * Improve logo mobile usage * Improve responsive layout of editors * Use static SVG for the moment (#3) * Use the static logo for the moment * Fix the broken JS, from going static, and make overscroll the right color * Fix padding
2018-02-06 12:52:39 +03:00
<div style={{ marginLeft: ".7em", width: "260px" }}>
2019-09-11 13:10:44 +03:00
<p>
More than <strong>3000</strong> tools and integrations on npm
</p>
Revamp landing page (#3718) * Begin landing page revamp * Break the editor integrations onto their own lines * Add template string * Add editor line breaks * Make logo clickable * Add more docs links * Don’t split the editor list items into paragraphs * Break plugin onto its own line * Move the “Why” button to the bottom of the block * Use suggested font * Change font * Change footer color * Add assets from @orta * Fix fonts * Use new editor assets * Add npm/yarn button * Switch to npx * Minor mobile tweaks * Add dependants * Lots of zeros are cooler to look at than a “k” * Improve button sizes, respect prefers-reduced-motion * Fixup media breakpoints for Get Started section * Increase padding of editors * CSS fixes from code review * Prevent repeatedly clicking on the logo from selecting nearby text * dependant -> dependent * Various CSS tightening * Set flex-basis on editors * Add new languages panel * Improve layout of languages * Cleanup grouping code * Fix users layout * Fix language image widths * space-evenly -> space-between * Fix typo * Remove unused var * Various CSS fixes * Set overflow-x: auto on code * Improve languages layout * Add silly cursor * Make logo 'draggable' * [Site] Margins and paddings (#2) * [Site] Margins and paddings * [Site] Bring back the link to why, that's a good guide worth linking to * Improve logo mobile usage * Improve responsive layout of editors * Use static SVG for the moment (#3) * Use the static logo for the moment * Fix the broken JS, from going static, and make overscroll the right color * Fix padding
2018-02-06 12:52:39 +03:00
<Button href="https://www.npmjs.com/browse/depended/prettier">
Install Them
</Button>
</div>
</div>
Revamp landing page (#3718) * Begin landing page revamp * Break the editor integrations onto their own lines * Add template string * Add editor line breaks * Make logo clickable * Add more docs links * Don’t split the editor list items into paragraphs * Break plugin onto its own line * Move the “Why” button to the bottom of the block * Use suggested font * Change font * Change footer color * Add assets from @orta * Fix fonts * Use new editor assets * Add npm/yarn button * Switch to npx * Minor mobile tweaks * Add dependants * Lots of zeros are cooler to look at than a “k” * Improve button sizes, respect prefers-reduced-motion * Fixup media breakpoints for Get Started section * Increase padding of editors * CSS fixes from code review * Prevent repeatedly clicking on the logo from selecting nearby text * dependant -> dependent * Various CSS tightening * Set flex-basis on editors * Add new languages panel * Improve layout of languages * Cleanup grouping code * Fix users layout * Fix language image widths * space-evenly -> space-between * Fix typo * Remove unused var * Various CSS fixes * Set overflow-x: auto on code * Improve languages layout * Add silly cursor * Make logo 'draggable' * [Site] Margins and paddings (#2) * [Site] Margins and paddings * [Site] Bring back the link to why, that's a good guide worth linking to * Improve logo mobile usage * Improve responsive layout of editors * Use static SVG for the moment (#3) * Use the static logo for the moment * Fix the broken JS, from going static, and make overscroll the right color * Fix padding
2018-02-06 12:52:39 +03:00
<div style={{ display: "flex", marginTop: "22px" }}>
<a
href="https://github.com/prettier/prettier"
className="growOnHover"
>
<img src="/images/github_grey.svg" style={{ height: "100px" }} />
</a>
<div style={{ marginLeft: ".7em", width: "260px" }}>
2019-09-11 13:10:44 +03:00
<p>
More than <strong>1M</strong> dependent repositories on GitHub
</p>
Revamp landing page (#3718) * Begin landing page revamp * Break the editor integrations onto their own lines * Add template string * Add editor line breaks * Make logo clickable * Add more docs links * Don’t split the editor list items into paragraphs * Break plugin onto its own line * Move the “Why” button to the bottom of the block * Use suggested font * Change font * Change footer color * Add assets from @orta * Fix fonts * Use new editor assets * Add npm/yarn button * Switch to npx * Minor mobile tweaks * Add dependants * Lots of zeros are cooler to look at than a “k” * Improve button sizes, respect prefers-reduced-motion * Fixup media breakpoints for Get Started section * Increase padding of editors * CSS fixes from code review * Prevent repeatedly clicking on the logo from selecting nearby text * dependant -> dependent * Various CSS tightening * Set flex-basis on editors * Add new languages panel * Improve layout of languages * Cleanup grouping code * Fix users layout * Fix language image widths * space-evenly -> space-between * Fix typo * Remove unused var * Various CSS fixes * Set overflow-x: auto on code * Improve languages layout * Add silly cursor * Make logo 'draggable' * [Site] Margins and paddings (#2) * [Site] Margins and paddings * [Site] Bring back the link to why, that's a good guide worth linking to * Improve logo mobile usage * Improve responsive layout of editors * Use static SVG for the moment (#3) * Use the static logo for the moment * Fix the broken JS, from going static, and make overscroll the right color * Fix padding
2018-02-06 12:52:39 +03:00
<Button href="https://github.com/prettier/prettier/network/dependents">
Check Them Out
</Button>
</div>
</div>
</div>
Revamp landing page (#3718) * Begin landing page revamp * Break the editor integrations onto their own lines * Add template string * Add editor line breaks * Make logo clickable * Add more docs links * Don’t split the editor list items into paragraphs * Break plugin onto its own line * Move the “Why” button to the bottom of the block * Use suggested font * Change font * Change footer color * Add assets from @orta * Fix fonts * Use new editor assets * Add npm/yarn button * Switch to npx * Minor mobile tweaks * Add dependants * Lots of zeros are cooler to look at than a “k” * Improve button sizes, respect prefers-reduced-motion * Fixup media breakpoints for Get Started section * Increase padding of editors * CSS fixes from code review * Prevent repeatedly clicking on the logo from selecting nearby text * dependant -> dependent * Various CSS tightening * Set flex-basis on editors * Add new languages panel * Improve layout of languages * Cleanup grouping code * Fix users layout * Fix language image widths * space-evenly -> space-between * Fix typo * Remove unused var * Various CSS fixes * Set overflow-x: auto on code * Improve languages layout * Add silly cursor * Make logo 'draggable' * [Site] Margins and paddings (#2) * [Site] Margins and paddings * [Site] Bring back the link to why, that's a good guide worth linking to * Improve logo mobile usage * Improve responsive layout of editors * Use static SVG for the moment (#3) * Use the static logo for the moment * Fix the broken JS, from going static, and make overscroll the right color * Fix padding
2018-02-06 12:52:39 +03:00
</Container>
</div>
);
};
UsersSection.propTypes = {
2018-07-01 16:59:20 +03:00
language: PropTypes.string
Revamp landing page (#3718) * Begin landing page revamp * Break the editor integrations onto their own lines * Add template string * Add editor line breaks * Make logo clickable * Add more docs links * Don’t split the editor list items into paragraphs * Break plugin onto its own line * Move the “Why” button to the bottom of the block * Use suggested font * Change font * Change footer color * Add assets from @orta * Fix fonts * Use new editor assets * Add npm/yarn button * Switch to npx * Minor mobile tweaks * Add dependants * Lots of zeros are cooler to look at than a “k” * Improve button sizes, respect prefers-reduced-motion * Fixup media breakpoints for Get Started section * Increase padding of editors * CSS fixes from code review * Prevent repeatedly clicking on the logo from selecting nearby text * dependant -> dependent * Various CSS tightening * Set flex-basis on editors * Add new languages panel * Improve layout of languages * Cleanup grouping code * Fix users layout * Fix language image widths * space-evenly -> space-between * Fix typo * Remove unused var * Various CSS fixes * Set overflow-x: auto on code * Improve languages layout * Add silly cursor * Make logo 'draggable' * [Site] Margins and paddings (#2) * [Site] Margins and paddings * [Site] Bring back the link to why, that's a good guide worth linking to * Improve logo mobile usage * Improve responsive layout of editors * Use static SVG for the moment (#3) * Use the static logo for the moment * Fix the broken JS, from going static, and make overscroll the right color * Fix padding
2018-02-06 12:52:39 +03:00
};
class Index extends React.Component {
render() {
const language = this.props.language || "en";
return (
<div>
<script src="landing.js" />
<HomeSplash language={language} />
2018-07-01 16:59:20 +03:00
<div className="mainContainer landingContainer">
Revamp landing page (#3718) * Begin landing page revamp * Break the editor integrations onto their own lines * Add template string * Add editor line breaks * Make logo clickable * Add more docs links * Don’t split the editor list items into paragraphs * Break plugin onto its own line * Move the “Why” button to the bottom of the block * Use suggested font * Change font * Change footer color * Add assets from @orta * Fix fonts * Use new editor assets * Add npm/yarn button * Switch to npx * Minor mobile tweaks * Add dependants * Lots of zeros are cooler to look at than a “k” * Improve button sizes, respect prefers-reduced-motion * Fixup media breakpoints for Get Started section * Increase padding of editors * CSS fixes from code review * Prevent repeatedly clicking on the logo from selecting nearby text * dependant -> dependent * Various CSS tightening * Set flex-basis on editors * Add new languages panel * Improve layout of languages * Cleanup grouping code * Fix users layout * Fix language image widths * space-evenly -> space-between * Fix typo * Remove unused var * Various CSS fixes * Set overflow-x: auto on code * Improve languages layout * Add silly cursor * Make logo 'draggable' * [Site] Margins and paddings (#2) * [Site] Margins and paddings * [Site] Bring back the link to why, that's a good guide worth linking to * Improve logo mobile usage * Improve responsive layout of editors * Use static SVG for the moment (#3) * Use the static logo for the moment * Fix the broken JS, from going static, and make overscroll the right color * Fix padding
2018-02-06 12:52:39 +03:00
<TldrSection language={language} />
<LanguagesSection />
<EditorSupportSection />
<GetStartedSection />
<UsersSection language={language} />
</div>
</div>
);
}
}
Index.propTypes = {
2018-07-01 16:59:20 +03:00
language: PropTypes.string
};
module.exports = Index;