Skip to content

Commit e212f86

Browse files
committed
Add logo to hero title and improve readability with white text
- Add psake logo next to the hero title - Change title and subtitle to white with text shadow for better readability - Center hero text content vertically for improved layout on wide screens - Make logo and title container responsive across all screen sizes - Logo scales appropriately: 80px (desktop), 60px (tablet), 50px (mobile), 40px (small mobile)
1 parent 2f9e77d commit e212f86

File tree

2 files changed

+44
-20
lines changed

2 files changed

+44
-20
lines changed

src/pages/index.module.css

Lines changed: 38 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -43,36 +43,37 @@
4343
display: flex;
4444
flex-direction: column;
4545
gap: 1.5rem;
46+
justify-content: center;
47+
}
48+
49+
.heroTitleContainer {
50+
display: flex;
51+
align-items: center;
52+
gap: 1.5rem;
53+
animation: fadeInDown 0.6s ease-out;
54+
}
55+
56+
.heroLogo {
57+
width: 80px;
58+
height: 80px;
59+
flex-shrink: 0;
4660
}
4761

4862
.heroTitle {
4963
font-size: 4rem;
5064
font-weight: 800;
5165
line-height: 1.1;
5266
margin: 0;
53-
background: linear-gradient(135deg, var(--ifm-color-primary), var(--ifm-color-primary-dark));
54-
-webkit-background-clip: text;
55-
-webkit-text-fill-color: transparent;
56-
background-clip: text;
57-
animation: fadeInDown 0.6s ease-out;
58-
}
59-
60-
[data-theme='dark'] .heroTitle {
61-
background: linear-gradient(135deg, var(--ifm-color-primary-light), var(--ifm-color-primary));
62-
-webkit-background-clip: text;
63-
-webkit-text-fill-color: transparent;
64-
background-clip: text;
67+
color: white;
68+
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
6569
}
6670

6771
.heroSubtitle {
6872
font-size: 1.5rem;
69-
color: var(--ifm-color-emphasis-800);
73+
color: white;
7074
margin: 0;
7175
animation: fadeInDown 0.6s ease-out 0.1s backwards;
72-
}
73-
74-
[data-theme='dark'] .heroSubtitle {
75-
color: var(--ifm-color-emphasis-600);
76+
text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
7677
}
7778

7879
.buttonGroup {
@@ -130,6 +131,16 @@
130131
align-items: center;
131132
}
132133

134+
.heroTitleContainer {
135+
flex-direction: column;
136+
gap: 1rem;
137+
}
138+
139+
.heroLogo {
140+
width: 60px;
141+
height: 60px;
142+
}
143+
133144
.heroTitle {
134145
font-size: 3rem;
135146
}
@@ -152,6 +163,11 @@
152163
padding: 2rem 1rem;
153164
}
154165

166+
.heroLogo {
167+
width: 50px;
168+
height: 50px;
169+
}
170+
155171
.heroTitle {
156172
font-size: 2.5rem;
157173
}
@@ -172,6 +188,11 @@
172188
}
173189

174190
@media screen and (max-width: 480px) {
191+
.heroLogo {
192+
width: 40px;
193+
height: 40px;
194+
}
195+
175196
.heroTitle {
176197
font-size: 2rem;
177198
}

src/pages/index.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,12 @@ function HomepageHeader() {
1919
<div className="container">
2020
<div className={styles.heroContent}>
2121
<div className={styles.heroText}>
22-
<Heading as="h1" className={styles.heroTitle}>
23-
{siteConfig.title}
24-
</Heading>
22+
<div className={styles.heroTitleContainer}>
23+
<img src="/img/logo.svg" alt="psake logo" className={styles.heroLogo} />
24+
<Heading as="h1" className={styles.heroTitle}>
25+
{siteConfig.title}
26+
</Heading>
27+
</div>
2528
<p className={styles.heroSubtitle}>{siteConfig.tagline}</p>
2629

2730
<div className={styles.buttonGroup}>

0 commit comments

Comments
 (0)