-
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
b09059b
commit ec56296
Showing
21 changed files
with
993 additions
and
793 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,29 @@ | ||
import Script from "next/script"; | ||
|
||
import * as gtag from "../lib/gtag"; | ||
|
||
function Analytics() { | ||
return ( | ||
<> | ||
<Script | ||
strategy="afterInteractive" | ||
src={`https://www.googletagmanager.com/gtag/js?id=${gtag.GA_TRACKING_ID}`} | ||
/> | ||
<Script | ||
id="gtag-init" | ||
strategy="afterInteractive" | ||
dangerouslySetInnerHTML={{ | ||
__html: ` | ||
window.dataLayer = window.dataLayer || []; | ||
function gtag(){dataLayer.push(arguments);} | ||
gtag('js', new Date()); | ||
gtag('config', '${gtag.GA_TRACKING_ID}', { | ||
page_path: window.location.pathname, | ||
}); | ||
`, | ||
}} | ||
/> | ||
</> | ||
); | ||
} | ||
export default Analytics; |
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,32 @@ | ||
import "../styles/globals.css"; | ||
import type { Metadata } from "next"; | ||
import { Inter } from "next/font/google"; | ||
|
||
import { Providers } from "./provider"; | ||
import Analytics from "./Analytics"; | ||
|
||
export const metadata: Metadata = { | ||
title: { | ||
template: "%s | Nishchay", | ||
default: "Nishchay", | ||
}, | ||
description: "Portfolio made with Next JS | Nishchay17", | ||
icons: ["/svg/logo.svg"], | ||
}; | ||
|
||
const inter = Inter({ subsets: ["latin"] }); | ||
|
||
export default function RootLayout({ | ||
children, | ||
}: { | ||
children: React.ReactNode; | ||
}) { | ||
return ( | ||
<html lang="en" suppressHydrationWarning> | ||
<body className={inter.className}> | ||
<Analytics /> | ||
<Providers>{children}</Providers> | ||
</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
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,32 @@ | ||
import React, { ReactElement } from "react"; | ||
import type { Metadata } from "next"; | ||
|
||
import ProjectLayout from "../../../components/ProjectPage/ProjectLayout"; | ||
import Layout from "../../../components/Layout"; | ||
import { projects } from "../../../config/project"; | ||
import { Project } from "../../../interface/Project"; | ||
|
||
export const metadata: Metadata = { | ||
title: "Project", | ||
}; | ||
|
||
function Project({ params: { id } }: { params: { id: string } }): ReactElement { | ||
let project: Project = { | ||
id: 99, | ||
name: "No project found", | ||
description: "No project with this Id found", | ||
tag: "", | ||
}; | ||
if (id) { | ||
const currentProject = projects.find((project) => project.id == +id); | ||
if (!!currentProject) { | ||
project = currentProject; | ||
} | ||
} | ||
|
||
return ( | ||
<Layout>{!project ? <></> : <ProjectLayout project={project} />}</Layout> | ||
); | ||
} | ||
|
||
export default Project; |
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,14 @@ | ||
"use client"; | ||
|
||
import { ChakraProvider } from "@chakra-ui/react"; | ||
import { AnimatePresence } from "framer-motion"; | ||
|
||
import { theme } from "../lib/theme"; | ||
|
||
export function Providers({ children }: { children: React.ReactNode }) { | ||
return ( | ||
<ChakraProvider theme={theme}> | ||
<AnimatePresence>{children}</AnimatePresence> | ||
</ChakraProvider> | ||
); | ||
} |
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
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
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
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
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
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.