forked from freeCodeCamp/classroom
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Dashboard page, Navbar, and Fonts (freeCodeCamp#20)
* Apply fixes from CodeFactor (freeCodeCamp#19) Co-authored-by: codefactor-io <[email protected]> * add freecodecamp logo, spot to put <li> elements, and add google fonts Co-authored-by: Mrugesh Mohapatra <[email protected]> Co-authored-by: codefactor-io <[email protected]>
- Loading branch information
1 parent
70fdb79
commit 824f48e
Showing
7 changed files
with
92 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export default function Layout({ children }) { | ||
return <div>{children}</div>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import navbarStyles from './navbar.module.css'; | ||
import Image from 'next/image'; | ||
|
||
export default function Navbar({ children }) { | ||
return ( | ||
<div className={navbarStyles.navbar}> | ||
<Image | ||
className={navbarStyles.navimage} | ||
priority | ||
layout='fixed' | ||
src='/images/fcc_primary_large.png' | ||
alt='FreeCodecamp Logo' | ||
width={330} | ||
height={40} | ||
></Image> | ||
<ul className={navbarStyles.navLinks}>{children}</ul> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
.navbar { | ||
display: flex; | ||
background-color: #0a0a23; | ||
color: #ffffff; | ||
padding: 15px; | ||
align-items: center; | ||
justify-content: space-between; | ||
font-family: 'Roboto Mono', monospace; | ||
} | ||
|
||
.navLinks { | ||
display: flex; | ||
list-style-type: none; | ||
} | ||
|
||
.navLinks li { | ||
padding-left: 10px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import Document, { Html, Head, Main, NextScript } from 'next/document'; | ||
|
||
class MyDocument extends Document { | ||
render() { | ||
return ( | ||
<Html> | ||
<Head> | ||
<link rel='preconnect' href='https://fonts.googleapis.com' /> | ||
<link rel='preconnect' href='https://fonts.gstatic.com' crossOrigin /> | ||
<link | ||
href='https://fonts.googleapis.com/css2?family=Lato&family=Roboto+Mono&display=swap' | ||
rel='stylesheet' | ||
/> | ||
</Head> | ||
<body> | ||
<Main /> | ||
<NextScript /> | ||
</body> | ||
</Html> | ||
); | ||
} | ||
} | ||
|
||
export default MyDocument; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import Head from 'next/head'; | ||
import Layout from '../components/layout'; | ||
import Link from 'next/link'; | ||
import Navbar from '../components/navbar'; | ||
|
||
export default function Home() { | ||
return ( | ||
<Layout> | ||
<Head> | ||
<title>Create Next App</title> | ||
<meta name='description' content='Generated by create next app' /> | ||
<link rel='icon' href='/favicon.ico' /> | ||
<Navbar> | ||
<li> | ||
<Link href={'#'}>Back</Link> | ||
</li> | ||
<li> | ||
<Link href={'#'}>Menu</Link> | ||
</li> | ||
<li> | ||
<Link href={'#'}>Extra</Link> | ||
</li> | ||
</Navbar> | ||
</Head> | ||
</Layout> | ||
); | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters