Skip to content

Commit 7d7fdc5

Browse files
committed
Redesign hero banner
1 parent 1d54cdb commit 7d7fdc5

4 files changed

Lines changed: 25 additions & 6 deletions

File tree

src/css/custom.css

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,18 @@
2222
--ifm-link-color: #FCF7E9;
2323
}
2424

25+
[data-theme='light'] {
26+
--ifm-color-primary: #5D0705;
27+
--ifm-color-primary-dark: #4A0504;
28+
--ifm-color-primary-darker: #370304;
29+
--ifm-color-primary-darkest: #240202;
30+
--ifm-color-primary-light: #D4A5A0;
31+
--ifm-color-primary-lighter: #E8D4CF;
32+
--ifm-color-primary-lightest: #F5E9E6;
33+
--ifm-code-font-size: 95%;
34+
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1);
35+
}
36+
2537
/* For readability concerns, you should choose a lighter palette in dark mode. */
2638
[data-theme='dark'] {
2739
--ifm-color-primary: #E8A89A;

src/pages/index.module.css

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*/
55

66
.hero {
7-
background-color: #e87567;
7+
background-color: #fcefe1;
88
}
99

1010
.heroInner {
@@ -18,7 +18,7 @@
1818
}
1919

2020
.heroProjectTagline {
21-
color: #fff;
21+
color: var(--ifm-color-primary-dark);
2222
font-size: 3rem;
2323
margin: 0;
2424
}
@@ -36,7 +36,7 @@
3636
}
3737

3838
.heroTitleTextHtml b {
39-
color: var(--ifm-color-primary-light);
39+
color: #911f1c;
4040
}
4141

4242
.indexCtas {
@@ -106,8 +106,15 @@
106106
}
107107

108108
.getStartedButton {
109-
--ifm-button-background-color: var(--ifm-color-primary-darkest);
109+
--ifm-button-background-color: var(--ifm-color-primary-dark);
110110
--ifm-button-border-color: var(--ifm-color-primary-darkest);
111+
112+
color: white;
113+
}
114+
115+
.tutorialButton {
116+
--ifm-button-background-color: var(--ifm-color-primary-lighter);
117+
--ifm-button-border-color: var(--ifm-color-primary-lighter);
111118
}
112119

113120
/* Responsive adjustments */

src/pages/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import styles from './index.module.css';
1212

1313
function HeroBanner() {
1414
return (
15-
<div className={styles.hero} data-theme="dark">
15+
<div className={styles.hero} data-theme="light">
1616
<div className={styles.heroOuter}>
1717
<img
1818
alt="Context-Generic Programming"
@@ -32,7 +32,7 @@ function HeroBanner() {
3232
Get Started
3333
</Link>
3434
<Link
35-
className="button button--secondary button--lg margin-left--md"
35+
className={clsx("button button--secondary button--lg margin-left--md", styles.tutorialButton)}
3636
to="/docs/tutorials/hello">
3737
Tutorial - 10 min ⏱️
3838
</Link>

static/img/cgp-hero.png

-70.9 KB
Loading

0 commit comments

Comments
 (0)