-
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.
- Loading branch information
1 parent
b726fc9
commit 3ca1634
Showing
9 changed files
with
428 additions
and
29 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
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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
import Image from 'next/image' | ||
import Image from "next/image"; | ||
|
||
export default function About() { | ||
return ( | ||
<main className="flex w-screen min-h-screen items-center justify-center"> | ||
<h1 className='text-4xl text-blue-400'>About page</h1> | ||
</main> | ||
) | ||
<div className="flex w-full"> | ||
<h1 className="text-4xl text-blue-400">About page</h1> | ||
</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 |
---|---|---|
@@ -1,25 +1,26 @@ | ||
import type { Metadata } from 'next' | ||
import { Roboto } from 'next/font/google' | ||
import './globals.css' | ||
import type { Metadata } from "next"; | ||
import { Roboto } from "next/font/google"; | ||
import { Header } from "@/components/Header"; | ||
import "./globals.css"; | ||
|
||
const roboto = Roboto({ | ||
weight: '400', | ||
subsets: ['latin'], | ||
}) | ||
weight: "400", | ||
subsets: ["latin"], | ||
}); | ||
|
||
export const metadata: Metadata = { | ||
title: 'Meet the Countries', | ||
description: 'An app to get to know more about the countries around the globe. Come and meet unknown countries by playing quizzes about them and interacting with friends', | ||
} | ||
title: "Meet the Countries", | ||
description: | ||
"An app to get to know more about the countries around the globe. Come and meet unknown countries by playing quizzes about them and interacting with friends", | ||
}; | ||
|
||
export default function RootLayout({ | ||
children, | ||
}: { | ||
children: React.ReactNode | ||
}) { | ||
export default function RootLayout({ children }: { children: React.ReactNode }) { | ||
return ( | ||
<html lang="en"> | ||
<body className={roboto.className}>{children}</body> | ||
<body className={roboto.className}> | ||
<Header /> | ||
<main className="flex w-full h-[calc(100%-64px)]">{children}</main> | ||
</body> | ||
</html> | ||
) | ||
); | ||
} |
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,25 @@ | ||
"use client"; | ||
import { Map, NavigationControl, MapProvider, Layer } from "react-map-gl"; | ||
import "mapbox-gl/dist/mapbox-gl.css"; | ||
|
||
export default function MapPage() { | ||
return ( | ||
<div className="flex w-full justify-center items-center"> | ||
<MapProvider> | ||
<Map | ||
id="quizMap" | ||
mapboxAccessToken="pk.eyJ1IjoibWFyY29lc2NhbGVpcmFkbXUiLCJhIjoiY2xwN29ldHIwMG16bjJxbXJhZXc5dXUxOSJ9.ZP0gYeYBB-nL5py2RANUOw" | ||
initialViewState={{ | ||
longitude: 5, | ||
latitude: 46, | ||
zoom: 4, | ||
}} | ||
style={{ width: "100%", height: "100%" }} | ||
mapStyle="mapbox://styles/mapbox/streets-v11" | ||
> | ||
<NavigationControl position="bottom-right" showCompass /> | ||
</Map> | ||
</MapProvider> | ||
</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 |
---|---|---|
@@ -1,9 +1,7 @@ | ||
import Image from 'next/image' | ||
|
||
export default function Home() { | ||
return ( | ||
<main className="flex w-screen min-h-screen items-center justify-center"> | ||
<h1 className='text-4xl text-blue-400'>Meet the countries3</h1> | ||
</main> | ||
) | ||
<div className="flex w-full"> | ||
<h1 className="text-4xl text-blue-400">Meet the countries</h1> | ||
</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,30 @@ | ||
import Link from "next/link"; | ||
import { FC } from "react"; | ||
|
||
export const MenuLink: FC<{ | ||
href: string; | ||
title: string; | ||
}> = ({ href, title }) => { | ||
return ( | ||
<Link | ||
href={href} | ||
className="px-6 py-2 font-medium text-white capitalize transition-colors duration-300 transform bg-blue-600 rounded-lg hover:bg-blue-500" | ||
> | ||
{title} | ||
</Link> | ||
); | ||
}; | ||
|
||
export function Header() { | ||
return ( | ||
<header className="flex w-full justify-between items-center h-16 px-8"> | ||
<h2>MtC</h2> | ||
|
||
<nav className="flex gap-8 items-center"> | ||
<MenuLink href="/" title="Home" /> | ||
<MenuLink href="/map" title="Map" /> | ||
<MenuLink href="/about" title="About" /> | ||
</nav> | ||
</header> | ||
); | ||
} |
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 @@ | ||
export * from './Header' |
Empty file.
Oops, something went wrong.