Skip to content

Commit

Permalink
enhance: make term page white bg
Browse files Browse the repository at this point in the history
  • Loading branch information
abtx committed Aug 10, 2023
1 parent 7c70b4c commit 126da79
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 24 deletions.
34 changes: 18 additions & 16 deletions src/components/GlossarySearch/GlossarySearch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,22 +79,24 @@ const GlossarySearch = () => {
</div>
</div>
</div>
<div className="container glossary-search__content-wrapper">
{results.length > 0 ? (
<div className="glossary-search__content-list">
{sortTermsAlphabetically(results).map((term) => (
<React.Fragment key={term.key}>
<GlossaryTerm term={term} />
</React.Fragment>
))}
</div>
) : (
<div>
<p className="finops-glossary__search-no-results">
No results found for <strong>{searchValue}</strong>
</p>
</div>
)}
<div className="white-bg">
<div className="container glossary-search__content-wrapper">
{results.length > 0 ? (
<div className="glossary-search__content-list">
{sortTermsAlphabetically(results).map((term) => (
<React.Fragment key={term.key}>
<GlossaryTerm term={term} />
</React.Fragment>
))}
</div>
) : (
<div>
<p className="finops-glossary__search-no-results">
No results found for <strong>{searchValue}</strong>
</p>
</div>
)}
</div>
</div>
</>
);
Expand Down
4 changes: 2 additions & 2 deletions src/components/GlossarySearch/GlossaryTerm.css
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@
display: flex;
flex-direction: column;
padding: 1.5rem;
background-color: var(--nu50);
border: 1px solid var(--border-color);
background-color: var(--nu10);
border: 1px solid var(--border-light);
border-radius: 8px;
height: fit-content;
}
Expand Down
6 changes: 5 additions & 1 deletion src/components/GlossaryTerm/GlossaryTermPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ const GlossaryTermPage = ({
}: {
children: ReactElement | ReactElement[];
}) => {
return <main className="container glossary-term__page">{children}</main>;
return (
<main className="white-bg">
<div className="glossary-term__page container">{children}</div>
</main>
);
};

export default GlossaryTermPage;
6 changes: 4 additions & 2 deletions src/components/GlossaryTerm/GlossaryTermPageIntro.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ const GlossaryTermPageIntro = ({
<h1 className="tagline">{title}</h1>
</div>
</div>
<div className="container intro__back-button">
<BackButton toPath={toPath} toText={toText} />
<div className="white-bg">
<div className="container intro__back-button">
<BackButton toPath={toPath} toText={toText} />
</div>
</div>
</>
);
Expand Down
9 changes: 9 additions & 0 deletions src/css/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,15 @@ h6 {
background-color: var(--nu60);
}

.white-bg {
background-color: white;
color: var(--text-color-dark)
}

.white-bg h3 {
color: var(--text-color-dark)
}

.close {
color: var(--nu-10);
opacity: 1;
Expand Down
4 changes: 2 additions & 2 deletions src/css/components.css
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,8 @@ kbd {
}

.intro__back-button {
margin-top: 2rem;
margin-bottom: 2rem;
padding-top: 2rem;
padding-bottom: 2rem;
}

/* USED BY */
Expand Down
2 changes: 1 addition & 1 deletion src/pages/glossary/finops.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const Finops = () => {
<PageLayout
title="FinOps - Infracost Glossary"
description="What is FinOps in cloud computing?"
pageClass="finops default-page-bg"
pageClass="finops"
hideCTA={true}
noIndex={false}
>
Expand Down

0 comments on commit 126da79

Please sign in to comment.