Skip to content

Commit

Permalink
fix: improve homepage quotes ui
Browse files Browse the repository at this point in the history
- set secondary color for homepage sections
  • Loading branch information
yoavniran committed Apr 7, 2022
1 parent febcab2 commit 1d33708
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/components/HomepageQuotes/HomepageQuotes.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const Quote = ({ text, name }) => {
return <div className={clsx("col col--4 quote-col", styles.quote)}>
<div className={styles.quoteHighlight} />
<FaQuoteRight size={32}/>
<div className="text--center padding-horiz--md">
<div className={clsx("text--center padding-horiz--md", styles.quoteText)}>
<h3>{name}</h3>
<p>"{text}"</p>
</div>
Expand Down
27 changes: 21 additions & 6 deletions src/components/HomepageQuotes/HomepageQuotes.module.css
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
.quotesContainer {
--ifm-hero-text-color: #FFFFFF;
margin: 40px 0;
/*background-color: var(--ifm-hero-background-color);*/

color: var(--ifm-hero-text-color);
}

.quotesContainer h3 {
color: #000000;
}

html[data-theme='dark'] .quotesContainer {
--ifm-hero-text-color: #000000;
}

html[data-theme='dark'] .quotesContainer h3 {
color: #FFFFFF;
}

.quote {
--quote-bg-color: rgba(28, 35, 40, 0.5);
position: relative;
Expand Down Expand Up @@ -47,6 +55,7 @@ html[data-theme='dark'] .quotesContainer {

.quotesContainer :global(.row .col.col.col) {
max-width: 400px;
padding-top: 40px;
}

@media (max-width: 800px) {
Expand Down Expand Up @@ -85,15 +94,21 @@ html[data-theme='dark'] .quote {
.quote p {
position: relative;
padding: 0 10%;
}

.quote h3 {
position: relative;
margin-top: 40px;
flex-grow: 2;
display: flex;
justify-content: center;
flex-direction: column;
}

.quote svg {
position: absolute;
left: 14%;
top: 20%;
}

.quoteText {
display: flex;
flex-direction: column;
justify-content: space-evenly;
height: 100%;
}
7 changes: 7 additions & 0 deletions src/pages/index.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
* and scoped locally.
*/

:global(
html[data-theme='dark'] .hero--primary
) {
--ifm-hero-background-color: #2b3c5e;
}


.heroBanner {
padding: 4rem 0 6rem;
text-align: center;
Expand Down

0 comments on commit 1d33708

Please sign in to comment.