Skip to content

Commit 5b2a0d9

Browse files
authored
Merge pull request #14 from ts-graphviz/fix-hero-component-styles
Update components and fix styles for better consistency and visual appeal
2 parents 4e7df17 + 8275d9e commit 5b2a0d9

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

src/components/HeroSection/index.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ const HeroSection: React.FC = () => {
2626
Bringing the power of Graphviz to the TypeScript/JavaScript ecosystem.
2727
</Translate>
2828
</Heading>
29+
<div className={styles.background} />
2930
<img src={useBaseUrl('/img/logo.png')} alt="ts-graphviz" />
3031
<p>
3132
<Translate id="HeroSection.headline">
@@ -45,6 +46,8 @@ const HeroSection: React.FC = () => {
4546
<Link
4647
className="button button--secondary button--lg"
4748
to="https://ts-graphviz.github.io/ts-graphviz/"
49+
target="_blank"
50+
rel="noopener noreferrer"
4851
>
4952
<Translate id="HeroSection.api">API Reference 📖</Translate>{' '}
5053
</Link>

src/components/HeroSection/styles.module.css

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,27 @@
22
text-align: center;
33
padding: 80px 16px;
44
position: relative;
5+
}
6+
7+
.background {
58
background: var(--ifm-color-primary-lighter);
9+
position: absolute;
10+
top: 0;
11+
left: 0;
12+
bottom: 0;
13+
right: 0;
14+
padding: 0;
15+
margin: 0;
616
z-index: -2;
717
}
818

9-
[data-theme="dark"] .hero {
19+
[data-theme="dark"] .background {
1020
background: var(--ifm-color-primary-darker);
1121
}
22+
.content {
23+
z-index: 100;
24+
}
25+
1226
.particles {
1327
position: absolute;
1428
top: 0;

0 commit comments

Comments
 (0)