Skip to content

Commit

Permalink
new navbar implemented (#144)
Browse files Browse the repository at this point in the history
  • Loading branch information
manangouhari authored Jan 26, 2021
1 parent 8a84b43 commit 26b59a9
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 59 deletions.
1 change: 1 addition & 0 deletions gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ module.exports = {
resolve: `gatsby-plugin-google-fonts`,
options: {
fonts: [
`Mulish\:400,700,800,900`,
`Roboto\:400,500,700`,
`Inconsolata\:400,700`,
'Open Sans:400,700',
Expand Down
33 changes: 7 additions & 26 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"version": "0.1.0",
"author": "",
"dependencies": {
"@babel/compat-data": "^7.9.0",
"@emotion/core": "^10.0.28",
"@emotion/styled": "^10.0.27",
"@material-ui/icons": "^4.11.2",
Expand Down
43 changes: 43 additions & 0 deletions src/components/NavBar/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import React from 'react';
import { Link } from 'gatsby';
import Theme from 'src/assets/theme.svg';

function NavLink({ to, children }) {
console.log(children);
return (
<Link className={`text-white text-lg font-bold`} to={to}>
{children}
</Link>
);
}

function NavButton({ children }) {
return (
<button className={`bg-primary-600 px-6 py-2 rounded`}>{children}</button>
);
}

function NavBar(props) {
return (
<nav
className={`bg-base-900 px-30 py-8 flex justify-between items-center font-mulish`}
>
<Theme className={`h-18 w-auto`} />
<ul className={`flex items-center space-x-12`}>
<li>
<NavLink to={'/overview'}>Academy</NavLink>
</li>
<li>
<NavLink to={'/overview'}>Marketplace</NavLink>
</li>
<li>
<NavButton>
<NavLink to={'/auth'}>Sign in</NavLink>
</NavButton>
</li>
</ul>
</nav>
);
}

export default NavBar;
35 changes: 2 additions & 33 deletions src/pages/tezos/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import SEO from 'src/components/Seo';
import landingPage from 'src/images/landing_page.jpg';
import StyledLink from 'src/components/StyledLink';
import { RightArrow } from 'src/components/IconSet';
import NavBar from '../../components/NavBar';

const HomePage = () => {
useEffect(() => {
Expand Down Expand Up @@ -58,39 +59,7 @@ const HomePage = () => {
height: 300,
}}
/>
<HomepageHeroImage>
<RightCloud />
<LeftCloud />
<HeroContainer>
<div>
<Logo />
</div>
<h1 className={`text-error-600`}>
Learn to code Tezos blockchain DApps in SmartPy <br />
</h1>
<HeroSubheading>
"Cryptobots vs Aliens" is an interactive code school that teaches
you to write smart contracts in SmartPy. Assemble your own
cryptobot that unleashes hell on the incoming alien invasion!
</HeroSubheading>
<StyledLink style={{ margin: '0.67em 0' }} to="/tezos/overview">
Start Learning
</StyledLink>
<InnerContainer>
<div>
<Plant />
</div>
<div>
{/* <Link to="/tezos/overview">
<StartLearning />
</Link> */}
</div>
<div>
<Zombie />
</div>
</InnerContainer>
</HeroContainer>
</HomepageHeroImage>
<NavBar></NavBar>
<div
style={{
background: 'linear-gradient(180deg, #05323D 0%, #05323D 100%)',
Expand Down
5 changes: 5 additions & 0 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ module.exports = {
code: '#030D18',
console: '061B2F',
},
white: '#ffffff',
},
spacing: {
px: '1px',
Expand All @@ -87,9 +88,11 @@ module.exports = {
12: '3rem',
14: '3.5rem',
16: '4rem',
18: '4.5rem',
20: '5rem',
24: '6rem',
28: '7rem',
30: '7.5rem',
32: '8rem',
36: '9rem',
40: '10rem',
Expand Down Expand Up @@ -209,7 +212,9 @@ module.exports = {
DEFAULT: '1',
},
fontFamily: {
mulish: ['Mulish', 'ui-sans-serif'],
sans: [
'Mulish',
'ui-sans-serif',
'system-ui',
'-apple-system',
Expand Down

0 comments on commit 26b59a9

Please sign in to comment.