refactor: semantic markup improvement, fix validation warnings (#7244)

* refactor: semantic markup improvement, fix validation warnings

* change section/article a bit
This commit is contained in:
Joshua Chen 2022-04-26 20:15:45 +08:00 committed by GitHub
parent f9fa2127ae
commit 67faa686e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 5 additions and 9 deletions

View File

@ -25,12 +25,12 @@ function filterItems(items: PropSidebarItem[]): PropSidebarItem[] {
export default function DocCardList({items, className}: Props): JSX.Element {
return (
<div className={clsx('row', className)}>
<section className={clsx('row', className)}>
{filterItems(items).map((item, index) => (
<article key={index} className="col col--6 margin-bottom--lg">
<DocCard key={index} item={item} />
</article>
))}
</div>
</section>
);
}

View File

@ -60,9 +60,9 @@ function DocCategoryGeneratedIndexPageContent({
<p>{categoryGeneratedIndex.description}</p>
)}
</header>
<main className="margin-top--lg">
<article className="margin-top--lg">
<DocCardList items={category.items} className={styles.list} />
</main>
</article>
<footer className="margin-top--lg">
<DocPaginator
previous={categoryGeneratedIndex.navigation.previous}

View File

@ -56,7 +56,6 @@ In this presentation at [Algolia Community Event](https://www.algolia.com/), [Me
height="315"
src="https://www.youtube.com/embed/Yhyx7otSksg"
title="Docusaurus: Documentation Made Easy"
frameBorder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowFullScreen
/>

View File

@ -108,7 +108,7 @@ function TweetsSection() {
<div className={clsx(styles.section, styles.sectionAlt)}>
<div className="container">
<h2 className={clsx('margin-bottom--lg', 'text--center')}>
Loved by many engineers
<Translate>Loved by many engineers</Translate>
</h2>
<div className={clsx('row', styles.tweetsSection)}>
{tweetColumns.map((tweetItems, i) => (
@ -168,7 +168,6 @@ function VideoContainer() {
height="315"
src="https://www.youtube.com/embed/_An9EsKPhp0"
title="Explain Like I'm 5: Docusaurus"
frameBorder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowFullScreen
loading="lazy"

View File

@ -56,7 +56,6 @@ In this presentation at [Algolia Community Event](https://www.algolia.com/), [Me
height="315"
src="https://www.youtube.com/embed/Yhyx7otSksg"
title="Docusaurus: Documentation Made Easy"
frameBorder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowFullScreen
/>

View File

@ -56,7 +56,6 @@ In this presentation at [Algolia Community Event](https://www.algolia.com/), [Me
height="315"
src="https://www.youtube.com/embed/Yhyx7otSksg"
title="Docusaurus: Documentation Made Easy"
frameBorder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowFullScreen
/>