forked from WordPress/gutenberg
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Documentation: Improve Gutenberg platform docs homepage (WordPress#59749
- Loading branch information
1 parent
35d12b1
commit d5d0aa6
Showing
33 changed files
with
332 additions
and
437 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
/** | ||
* External dependencies | ||
*/ | ||
import React from 'react'; | ||
import clsx from 'clsx'; | ||
|
||
/** | ||
* Internal dependencies | ||
*/ | ||
import styles from './styles.module.css'; | ||
|
||
const blocks = [ | ||
{ | ||
title: 'Paragraph', | ||
img: require( '@site/static/img/paragraph.png' ).default, | ||
}, | ||
{ | ||
title: 'Heading', | ||
img: require( '@site/static/img/heading.png' ).default, | ||
}, | ||
{ | ||
title: 'Media & Text', | ||
img: require( '@site/static/img/media-text.png' ).default, | ||
}, | ||
{ | ||
title: 'Image', | ||
img: require( '@site/static/img/image.png' ).default, | ||
}, | ||
{ | ||
title: 'Cover', | ||
img: require( '@site/static/img/cover.png' ).default, | ||
}, | ||
{ | ||
title: 'Gallery', | ||
img: require( '@site/static/img/gallery.png' ).default, | ||
}, | ||
{ | ||
title: 'Video', | ||
img: require( '@site/static/img/video.png' ).default, | ||
}, | ||
{ | ||
title: 'Audio', | ||
img: require( '@site/static/img/audio.png' ).default, | ||
}, | ||
{ | ||
title: 'Columns', | ||
img: require( '@site/static/img/columns.png' ).default, | ||
}, | ||
{ | ||
title: 'File', | ||
img: require( '@site/static/img/file.png' ).default, | ||
}, | ||
{ | ||
title: 'Code', | ||
img: require( '@site/static/img/code.png' ).default, | ||
}, | ||
{ | ||
title: 'List', | ||
img: require( '@site/static/img/list.png' ).default, | ||
}, | ||
]; | ||
|
||
function Block( { img, title } ) { | ||
return ( | ||
<div className={ styles.block }> | ||
<div> | ||
<img className={ styles.image } src={ img } alt={ title } /> | ||
</div> | ||
<h3 className={ styles.blockTitle }>{ title }</h3> | ||
</div> | ||
); | ||
} | ||
|
||
export default function HomepageBlocks() { | ||
return ( | ||
<section className={ styles.blocks }> | ||
<div className={ clsx( 'container', styles.titleContainer ) }> | ||
<h2 className={ styles.title }>Be your own builder.</h2> | ||
<p className={ styles.description }> | ||
Blocks allow users to build their own content without any | ||
coding knowledge. Here’s a selection of the default blocks | ||
included with Gutenberg: | ||
</p> | ||
</div> | ||
<div className={ clsx( 'container', styles.grid ) }> | ||
{ blocks.map( ( props, idx ) => ( | ||
<Block key={ idx } { ...props } /> | ||
) ) } | ||
</div> | ||
</section> | ||
); | ||
} |
52 changes: 52 additions & 0 deletions
52
platform-docs/src/components/HomepageBlocks/styles.module.css
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 |
---|---|---|
@@ -0,0 +1,52 @@ | ||
.blocks { | ||
padding: 8rem 0; | ||
display: flex; | ||
flex-direction: column; | ||
gap: 1rem; | ||
} | ||
|
||
.titleContainer { | ||
max-width: 1000px; | ||
} | ||
|
||
.title { | ||
font-weight: 400; | ||
font-size: 60px; | ||
} | ||
|
||
[data-theme="dark"] .title { | ||
color: #fff; | ||
} | ||
|
||
.description { | ||
font-size: 20px; | ||
} | ||
|
||
.grid { | ||
max-width: 1000px; | ||
display: grid; | ||
gap: 2rem; | ||
grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); | ||
} | ||
|
||
.image { | ||
width: 100%; | ||
aspect-ratio: 1/1; | ||
} | ||
|
||
.block { | ||
display: flex; | ||
flex-direction: column; | ||
gap: 1rem; | ||
} | ||
|
||
.blockTitle { | ||
padding: 0; | ||
margin: 0; | ||
font-weight: 400; | ||
text-align: center; | ||
} | ||
|
||
[data-theme="dark"] .blockTitle { | ||
color: #fff; | ||
} |
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
35 changes: 24 additions & 11 deletions
35
platform-docs/src/components/HomepageFeatures/styles.module.css
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,21 +1,34 @@ | ||
.features { | ||
display: flex; | ||
align-items: center; | ||
padding: 2rem 0; | ||
background: var(--ifm-color-secondary); | ||
padding: 4rem 0; | ||
background: url(@site/static/img/gradient_background.png); | ||
background-attachment: fixed; | ||
background-repeat: no-repeat; | ||
background-size: cover; | ||
background-position: 50% 50%; | ||
color: #fff; | ||
} | ||
|
||
.features > div { | ||
max-width: var(--ifm-container-width); | ||
margin: auto; | ||
justify-content: space-between; | ||
.grid { | ||
max-width: 800px; | ||
display: grid; | ||
gap: 6rem; | ||
grid-template-columns: 1fr 1fr; | ||
} | ||
|
||
.featureSvg { | ||
height: 200px; | ||
width: 200px; | ||
height: 40px; | ||
width: 40px; | ||
fill: #fff; | ||
} | ||
|
||
.feature { | ||
max-width: 30%; | ||
display: flex; | ||
flex-direction: column; | ||
gap: 1rem; | ||
} | ||
|
||
.title { | ||
color: #fff; | ||
padding: 0; | ||
margin: 0; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/** | ||
* External dependencies | ||
*/ | ||
import React from 'react'; | ||
import clsx from 'clsx'; | ||
|
||
/** | ||
* Internal dependencies | ||
*/ | ||
import styles from './styles.module.css'; | ||
|
||
export default function HomepageThanks() { | ||
return ( | ||
<section className={ styles.thanks }> | ||
<div className={ clsx( 'container', styles.container ) }> | ||
<h2 className={ styles.title }>Thanks for trying Gutenberg.</h2> | ||
<div className={ styles.columns }> | ||
<p className={ styles.description }> | ||
Gutenberg is project by the WordPress community. New | ||
developments and experiments will continue in the{ ' ' } | ||
<a href="http://github.com/wordPress/gutenberg/"> | ||
Gutenberg repository | ||
</a> | ||
. | ||
</p> | ||
<div className={ styles.links }> | ||
<div> | ||
<a href="https://twitter.com/WordPress"> | ||
Twitter ↗ | ||
</a> | ||
</div> | ||
<div> | ||
<a href="http://github.com/wordPress/gutenberg/"> | ||
Github ↗ | ||
</a> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</section> | ||
); | ||
} |
31 changes: 31 additions & 0 deletions
31
platform-docs/src/components/HomepageThanks/styles.module.css
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
.thanks { | ||
padding: 8rem 0; | ||
background: rgb(236, 246, 250); | ||
color: #000; | ||
} | ||
|
||
[data-theme="dark"] .thanks a { | ||
color: var(--ifm-color-secondary); | ||
} | ||
|
||
.container { | ||
max-width: 1000px; | ||
display: flex; | ||
flex-direction: column; | ||
gap: 1rem; | ||
} | ||
|
||
.title { | ||
font-weight: 400; | ||
font-size: 60px; | ||
} | ||
|
||
.description { | ||
font-size: 20px; | ||
} | ||
|
||
.columns { | ||
display: grid; | ||
gap: 4rem; | ||
grid-template-columns: 1fr 1fr; | ||
} |
2 changes: 1 addition & 1 deletion
2
platform-docs/src/components/HomepageTrustedBy/styles.module.css
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,5 +1,5 @@ | ||
.container { | ||
padding: 5rem 0 2rem; | ||
padding: 5rem 0 4rem; | ||
background: #fff; | ||
color: var(--ifm-color-gray-800); | ||
} | ||
|
Oops, something went wrong.