Skip to content

Commit

Permalink
chore: Update dark theme logos styling
Browse files Browse the repository at this point in the history
  • Loading branch information
rahulharpal1603 committed Jul 23, 2024
1 parent 143221a commit adf7836
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 3 deletions.
7 changes: 6 additions & 1 deletion docs/src/components/HomepageFeatures/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,15 @@ const FeatureList: FeatureItem[] = [
]

function Feature({ title, Svg, description }: FeatureItem) {
var classVar = styles.featureSvg;
if(Svg === require('@site/static/img/github.svg').default)
{
classVar = styles.featureSvg +" "+ styles.githubLogo;
}
return (
<div className={clsx('col col--4')}>
<div className="text--center">
<Svg className={styles.featureSvg} role="img" />
<Svg className={classVar} role="img" />
</div>
<div className="text--center padding-horiz--md">
<h3>{title}</h3>
Expand Down
4 changes: 4 additions & 0 deletions docs/src/components/HomepageFeatures/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@
height: 200px;
width: 200px;
}

html[data-theme='dark'] .githubLogo {
fill: #fff;
}
7 changes: 6 additions & 1 deletion docs/src/components/HomepageSponsored/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,16 @@ const SponsorList: SponsorItem[] = [
]

function Feature({ title, Svg, link }: FeatureItem) {
var classVar = styles.featureSvg;
if(Svg === require('@site/static/img/Algolia-logo.svg').default)
{
classVar = styles.featureSvg +" "+ styles.AlgoliaLogo;
}
return (
<div className={clsx('col col--6')}>
<div className="text--center">
<a href={link} title={title} target="_blank" rel="noreferrer" aria-label={title}>
<Svg className={styles.featureSvg} role="img" />
<Svg className={classVar} role="img"/>
</a>
</div>
</div>
Expand Down
4 changes: 4 additions & 0 deletions docs/src/components/HomepageSponsored/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,7 @@
width: 100%;
}
}

html[data-theme='dark'] .AlgoliaLogo{
fill: #fff;
}
2 changes: 1 addition & 1 deletion docs/static/img/Algolia-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit adf7836

Please sign in to comment.