Skip to content

Commit 5f8ae6c

Browse files
committed
Fix navbar position
Add sticky postioning so navbar is always visible
1 parent 3ef675a commit 5f8ae6c

File tree

3 files changed

+18
-16
lines changed

3 files changed

+18
-16
lines changed

src/components/Nav.jsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,21 @@ class Nav extends React.PureComponent {
3636
<a href="#features">FEATURES</a>
3737
</li>
3838
<li>
39-
<a href="#download">DOWNLOAD</a>
39+
<a href="#download">
40+
DOWNLOAD<i class="fas fa-download"></i>
41+
</a>
4042
</li>
4143
{configs.app_github_url && (
4244
<li>
4345
<a href={configs.app_github_url}>
44-
GitHub <i className="fab fa-github" />
46+
GITHUB <i className="fab fa-github" />
4547
</a>
4648
</li>
4749
)}
4850
{configs.community_website && (
4951
<li>
5052
<a href={configs.community_website}>
51-
Community <i className="fas fa-comments" />
53+
COMMUNITY <i className="fas fa-comments" />
5254
</a>
5355
</li>
5456
)}

src/components/style.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,6 @@ export default createGlobalStyle`
8080
border-radius: 0px 0px 40px 40px;
8181
}
8282
83-
.headerBackground {
84-
height: 115px;
85-
background-color: ${configs.header_background};
86-
}
87-
8883
.container {
8984
// Set up the container for the site content
9085
display: grid;
@@ -122,7 +117,12 @@ export default createGlobalStyle`
122117
123118
header {
124119
display: flex;
120+
padding: 0px 50px;
121+
position: sticky;
122+
top: 0;
125123
width: 100%;
124+
background-color: ${configs.header_background};
125+
z-index: 2;
126126
}
127127
128128
.logo {

src/pages/index.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -93,22 +93,22 @@ class IndexPage extends React.PureComponent {
9393
<Layout>
9494
<SEO title="Home" keywords={configs.app_keywords} />
9595

96+
<Nav data={data} />
9697
<div
9798
className="imageWrapper"
9899
style={{
99100
background: configs.main_color,
100101
}}
101102
>
102-
<div className="headerBackground">
103-
<div className="container">
104-
<Nav data={data} />
105-
<Header data={data} version={version} />
106-
<Features />
107-
<Changelog releaseNotes={releaseNotes} />
108-
<Footer />
109-
</div>
103+
<div className="container">
104+
<Header data={data} version={version} />
110105
</div>
111106
</div>
107+
<div className="container">
108+
<Features />
109+
<Changelog releaseNotes={releaseNotes} />
110+
<Footer />
111+
</div>
112112
</Layout>
113113
)
114114
}

0 commit comments

Comments
 (0)