Skip to content

Commit

Permalink
fix favorites background
Browse files Browse the repository at this point in the history
  • Loading branch information
slorber committed Apr 10, 2024
1 parent 1eda770 commit ad90e16
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
30 changes: 15 additions & 15 deletions website/src/pages/showcase/_components/ShowcaseCards/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

import type {ReactNode} from 'react';
import clsx from 'clsx';
import Translate from '@docusaurus/Translate';
import {sortedUsers, type User} from '@site/src/data/users';
Expand Down Expand Up @@ -48,13 +49,16 @@ function HeadingAllSites() {
);
}

function CardList({items}: {items: User[]}) {
function CardList({heading, items}: {heading?: ReactNode; items: User[]}) {
return (
<ul className={clsx('clean-list', styles.cardList)}>
{items.map((item) => (
<ShowcaseCard key={item.title} user={item} />
))}
</ul>
<div className="container">
{heading}
<ul className={clsx('clean-list', styles.cardList)}>
{items.map((item) => (
<ShowcaseCard key={item.title} user={item} />
))}
</ul>
</div>
);
}

Expand All @@ -79,19 +83,15 @@ export default function ShowcaseCards() {
<section className="margin-top--lg margin-bottom--xl">
{filteredUsers.length === sortedUsers.length ? (
<>
<div className={clsx('container', styles.showcaseFavorite)}>
<HeadingFavorites />
<CardList items={favoriteUsers} />
<div className={styles.showcaseFavorite}>
<CardList heading={<HeadingFavorites />} items={favoriteUsers} />
</div>
<div className="container margin-top--lg">
<HeadingAllSites />
<CardList items={otherUsers} />
<div className="margin-top--lg">
<CardList heading={<HeadingAllSites />} items={otherUsers} />
</div>
</>
) : (
<div className="container">
<CardList items={filteredUsers} />
</div>
<CardList items={filteredUsers} />
)}
</section>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
}

html[data-theme='dark'] .showcaseFavorite {
background-color: #1d1e1e;
background-color: #232525;
}

.headingFavorites {
Expand Down

0 comments on commit ad90e16

Please sign in to comment.