Skip to content

Commit 1651b94

Browse files
committed
Tweak styles
1 parent 3bab749 commit 1651b94

3 files changed

Lines changed: 148 additions & 14 deletions

File tree

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,34 @@
11
.features {
22
display: flex;
3+
flex-direction: column;
34
align-items: center;
4-
padding: 2rem 0;
5+
padding: 4rem 0;
56
width: 100%;
67
}
78

9+
.featuresTitle {
10+
font-size: 2.5rem;
11+
margin-bottom: 3rem;
12+
}
13+
814
.featureSvg {
9-
height: 200px;
10-
width: 200px;
15+
height: 180px;
16+
width: 180px;
17+
margin-bottom: 1rem;
18+
}
19+
20+
@media screen and (max-width: 996px) {
21+
.features {
22+
padding: 2rem 0;
23+
}
24+
25+
.featuresTitle {
26+
font-size: 2rem;
27+
margin-bottom: 2rem;
28+
}
29+
30+
.featureSvg {
31+
height: 150px;
32+
width: 150px;
33+
}
1134
}

src/pages/index.module.css

Lines changed: 118 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,131 @@
33
* and scoped locally.
44
*/
55

6-
.heroBanner {
7-
padding: 4rem 0;
8-
text-align: center;
9-
position: relative;
6+
.hero {
7+
background-color: var(--ifm-color-primary-dark);
8+
padding: 4rem 2rem;
9+
}
10+
11+
.heroInner {
12+
margin: 0 auto;
13+
max-width: 1100px;
14+
padding: 0 0.5rem;
15+
}
16+
17+
.heroProjectTagline {
18+
color: #fff;
19+
font-size: 3rem;
20+
margin: 0;
21+
}
22+
23+
.heroLogo {
24+
display: block;
25+
margin: 0 auto 1.5rem;
26+
border-radius: 50%;
27+
float: right;
28+
}
29+
30+
.heroTitleTextHtml {
31+
display: block;
32+
margin-top: 0.5rem;
33+
line-height: 1.2;
34+
}
35+
36+
.heroTitleTextHtml b {
37+
color: var(--ifm-color-primary-light);
38+
}
39+
40+
.indexCtas {
41+
--ifm-button-size-multiplier: 1.2;
42+
display: flex;
43+
flex-wrap: wrap;
44+
gap: 1rem;
45+
margin-top: 2rem;
46+
}
47+
48+
.indexCtasGitHubButtonWrapper {
49+
display: flex;
50+
align-items: center;
51+
}
52+
53+
.indexCtasGitHubButton {
54+
border: 0;
1055
overflow: hidden;
1156
}
1257

13-
@media screen and (max-width: 996px) {
14-
.heroBanner {
15-
padding: 2rem;
16-
}
58+
.section {
59+
padding: 4rem 2rem;
60+
}
61+
62+
.sectionAlt {
63+
background-color: var(--ifm-color-emphasis-200);
64+
}
65+
66+
[data-theme='dark'] .sectionAlt {
67+
background-color: var(--ifm-color-emphasis-200);
68+
}
69+
70+
.codeExample {
71+
background-color: var(--ifm-code-background);
72+
border-radius: var(--ifm-code-border-radius);
73+
padding: 1rem;
74+
overflow-x: auto;
75+
}
76+
77+
.codeExample pre {
78+
margin: 0;
79+
padding: 0;
80+
background: transparent;
81+
font-size: 0.9rem;
82+
line-height: 1.5;
83+
}
84+
85+
.problemCard {
86+
padding: 1.5rem;
87+
border-radius: 8px;
88+
height: 100%;
89+
background-color: var(--ifm-card-background-color);
90+
border: 1px solid var(--ifm-color-emphasis-300);
91+
}
92+
93+
.problemCard h3 {
94+
margin-bottom: 1rem;
95+
font-size: 1.2rem;
1796
}
1897

1998
.buttons {
2099
display: flex;
21100
align-items: center;
22101
justify-content: center;
102+
flex-wrap: wrap;
103+
gap: 0.5rem;
104+
}
105+
106+
/* Responsive adjustments */
107+
@media screen and (max-width: 996px) {
108+
.hero {
109+
padding: 2rem 1rem;
110+
}
111+
112+
.heroProjectTagline {
113+
font-size: 2rem;
114+
}
115+
116+
.heroLogo {
117+
width: 150px;
118+
height: 150px;
119+
}
120+
121+
.section {
122+
padding: 2rem 1rem;
123+
}
124+
125+
.indexCtas {
126+
flex-direction: column;
127+
}
128+
129+
.indexCtasGitHubButtonWrapper {
130+
width: 100%;
131+
justify-content: center;
132+
}
23133
}

src/pages/index.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import useBaseUrl from '@docusaurus/useBaseUrl';
66
import Layout from '@theme/Layout';
77
import HomepageFeatures from '@site/src/components/HomepageFeatures';
88
import Heading from '@theme/Heading';
9+
import CodeBlock from '@theme/CodeBlock';
910

1011
import styles from './index.module.css';
1112

@@ -17,7 +18,7 @@ function HeroBanner() {
1718
<img
1819
alt="Context-Generic Programming"
1920
className={styles.heroLogo}
20-
src={useBaseUrl('/img/docusaurus.png')}
21+
src={useBaseUrl('/img/cgp-logo.svg')}
2122
width="200"
2223
height="200"
2324
/>
@@ -69,7 +70,7 @@ function CodeExampleSection() {
6970
</div>
7071
<div className="col col--6">
7172
<div className={styles.codeExample}>
72-
<pre>
73+
<CodeBlock language="rust">
7374
{`#[cgp_component(HashProvider)]
7475
pub trait Hash { ... }
7576
@@ -84,7 +85,7 @@ delegate_components! {
8485
HashProviderComponent: HashWithDisplay,
8586
}
8687
}`}
87-
</pre>
88+
</CodeBlock>
8889
</div>
8990
</div>
9091
</div>

0 commit comments

Comments
 (0)